I am wondering what causes the difference between the following two way of writing the same operation? Here ‘‘s’’ is a matrix with shape (batch_size x 4), and ‘‘model’’ is a DNN.
out_1 = model(ss[0:1])
out_2 = model(ss)[0:1]
print(out_2-out_1)

output:
tensor(1.00000e-07 *
     [[-3.5763, -2.3842,  0.0000,  4.7684]], device='cuda:1')