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.