ptrblck:

tensor = torch.from_numpy(array) .


Hi, i have the same error and when i use this instruction new error is appear , " RuntimeError: mat1 dim 1 must match mat2 dim 0 "
and this my code
for batch_idx, inputs in enumerate(validloader):
inputs= torch.from_numpy(inputs)
if use_cuda:
inputs = inputs.cuda()
inputs = Variable(inputs)
hidden = self.encode(inputs)
Any help please and thanks a lot