Closed Jason-xin closed 4 years ago
Hello, in code datase.py
def np2Tensor(array): ts = (2, 0, 1) tensor = torch.FloatTensor(array.transpose(ts).astype(float)) return tensor
but alpha image is gray with only 2-D, how to transpose it?
Stack 3 copies of the same rank-2 grayscale image tensor to become a rank-3 tensor.
Hello, in code datase.py
def np2Tensor(array): ts = (2, 0, 1) tensor = torch.FloatTensor(array.transpose(ts).astype(float)) return tensor
but alpha image is gray with only 2-D, how to transpose it?