When I learned from other people’s models, I found that sometimes they would call transpose again after reshape to adjust the shape of the array. But if I already know the shape, wouldn’t it be OK to change the shape when I was directly in reshape? Why do I have to do another transpose
code was :
x[i] = tf.transpose(tf.reshape(x[i],(bs,self.na, self.no, ny, nx)),perm=[0,1,3,4,2])