qt.QImage.fromTensor(tensor)

Return a new QImage filled with data from a torch Tensor.

Tensor tensor must have 2 or 3 dimensions.