Hello, I’m trying to use
torch.load in my script.
Something strange happened when I saved a
800*3*480*640 FloatTensor A, and re-loaded it, all value after A became 0. I believe
2 are two special numbers because I have tested this on another
1200*3*480*640 FloatTensor B, still all value of re-loaded B after B became 0.
I’m confused by this, is there any restriction about using
torch.load? Here’s how I used them:
A = torch.from_numpy(A_array) checkEmpty(A) # passed torch.save(A, 'A_tensor') A = torch.load('A_tensor') checkEmpty(A) # failed
Then to find the first ZERO map:
for i in range(A.size()): for j in range(A.size()): if torch.max(A[i][j]) == 0.0: print(i, j)
(i j) is