The code runs well on Linux, but with error on windows. #40
Description
The code runs well in Linux, but with errors in windows.
Here is the code and error message:
`t = tn.rand((3,3,3,3,3,3))
print(t)
t = tn.cross(function=lambda x: x**2, tensors=[t])
print(t)`
Traceback (most recent call last):
File "C:\Users\4\PycharmProjects\TTALS\test.py", line 22, in
t = tn.cross(function=lambda x: x ** 2, tensors=[t])
File "C:\Users\4\anaconda3\lib\site-packages\tntorch\cross.py", line 261, in cross
ys_val = f([t[Xs_val].torch() for t in tensors])
File "C:\Users\4\anaconda3\lib\site-packages\tntorch\cross.py", line 261, in
ys_val = f([t[Xs_val].torch() for t in tensors])
File "C:\Users\4\anaconda3\lib\site-packages\tntorch\tensor.py", line 1019, in getitem
factors['index'] = get_key(counter, key[i])
File "C:\Users\4\anaconda3\lib\site-packages\tntorch\tensor.py", line 933, in get_key
return self.cores[counter][..., key, :]
IndexError: tensors used as indices must be long, byte or bool tensors
I change the "key" to 0, and the error is gone. So the problem may be the "key".
The problem only occurs on Windows.