You will have to use tf.meshgrid and tf.gather_nd to achieve what you want: tensor = tf.random.uniform((60, 128, 30000)) # shape (60, 128, ... ... <看更多>
Search
Search
You will have to use tf.meshgrid and tf.gather_nd to achieve what you want: tensor = tf.random.uniform((60, 128, 30000)) # shape (60, 128, ... ... <看更多>
argmax (dim) causes an error when any dimension of the tensor is of size 0. >>> torch.zeros((2,0)).max(0) RuntimeError: cannot perform reduction function max on ... ... <看更多>
Your problem is that you are not specifying the axis that you want to convert your tensor into a one hot tensor vector with so it's ... ... <看更多>
... <看更多>