I am running this following code to do prediction for my model. After I am trying plot a graph of practiced values - unfortunately the output of my variable Y_pred is of the type that I cannot ready the values:
def predict(model,testloader, X_test, Y_test,  epoch, n_epochs):
model.eval()
Y_pred = []
for data, target in test_loader:
    if torch.cuda.is_available():
        data = data.cuda()
    output = model(data)
    print(output)
    Y_pred.append(output.numpy)


Y_pred = np.array(Y_pred)
plot_prediction(X_test, Y_test, Y_pred, epoch, n_epochs) 

When  plotting , I am getting the following

image871×160 22 KB