How to convert a variable to a numpy?
I found that a tensor can be converted into a numpy array. but how to cast a variable into a numpy array?
maplewizard
maplewizard
albanD
Thanks. It can fulfill my requirement.
maplewizard
what about replacing the var by such sort of var.data <-- np.array, it won’t autograd ???
Tepp
albanD
var.data.numpy() will convert Variable to numpy array.
deepak_mangla