The prediction results of Python model and the way of darray


The prediction results turned to numpy

#If the model is running on a GPU  /  logits.cpu().numpy()
#If the model runs on the CPU  /  logits.numpy()

Turn the matrix into tensor:

np_arr = np.array([1,2,3,4])

The way to transfer the prediction results of the above Python model with ndarray is the whole content shared by Xiaobian. I hope it can give you a reference, and I hope you can support developpaer more.

Recommended Today

[Q & A share the second bullet] MySQL search engine, after watching the tyrannical interviewer!

Hello, I’m younger brother. A few days ago, I shared the second interview question, the interview site of search engine in MySQL. This question is the interview at normal temperature. After reading it, I’m sure you will gain something in terms of database engine If you haven’t read my first share, you can refer to […]