I’ve trained a small autoencoder on MNIST and want to use it to make predictions on an input image.  This is what I do, in the same jupyter notebook, after training the model.
example_index = 67

# make example a torch tensor
value = torch.from_numpy(x_train[example_index])

# then put it on the GPU, make it float and insert a fake batch dimension
test_value = Variable(value.cuda())
test_value = test_value.float()
test_value = test_value.unsqueeze(0)

# pass it through the model
prediction = model(test_value)

# get the result out and reshape it
cpu_pred = prediction.cpu()
result = cpu_pred.data.numpy()
array_res = np.reshape(result, (28,28))

then I plot both model output and this input. No matter how I change the input, the output image is exactly the same. Any ideas?