ValueError: only one element tensors can be converted to Python scalars - Confusion matrix in RNN evaluation


I am trying to make confusion matrix with the help of sklearn library but while using it to
evaluate the RNN_net, using it with train_setup i am getting following error.
ValueError: only one element tensors can be converted to Python scalars

I am attaching the screenshot of error in reply…

Please point us to the notebook with code, or atleast post the screenshot of error so that people can know error is in which line.