The numpy arrays in the list are 2D array that have different sizes, let's say:
1x1, 4x4, 8x8, etc
about 7 arrays in total.
I know how to convert each on of them, by:
torch.from_numpy(a1by1).type(torch.FloatTensor)
torch.from_numpy(a4by4).type(torch.FloatTensor)
etc..
Is there a way to convert the entire list in one command?
I found these 2 question:
How to convert a list or numpy array to a 1d torch tensor?
How to convert a list of tensors into a torch::Tensor?
but it's not what Im' looking for
One command
is to wrap those individual commands in a function. What's so import an about "one command"? You might also want to explain why this is difficult, if for no other reason than to show your own command of the language and these packages. – hpaulj