Hi, I have python code
and converting the code to android, and I have question of some commands of pythons.
First, my python code is unsqueeze(x.0) where x is pytorch.tensor.
e.g) when unsqueeze(x,0) is performed, shape of x will be [3,2,4] to [1,3,2,4] <-- add just 1 dimension


in JAVA, can I do it how…?? (java command is so unusual for me… please help)


Also, I want to reorder the pytorch.tensor in JAVA
e.g) [3,2,4] to [2,4,3]
in python it is performed by torch.from_numpy(x).permute(2, 0, 1)
In JAVA, how to can I do it? (JAVA command is fine to me… I found some java function code or package that support reshape in python where the input is array… in pytorch.java… what is the type of tensor? it is array?)


thank you.