Using numpy.where in 4D matrix to set values at the 3rd dimension?

前端 未结 0 1089
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-07 11:22

Say I have two 4D matrices

import numpy as np
from tensorflow.keras.utils import to_categorical

x = to_categorical(np.argmax(np.random.rand(2, 2, 2, 4), axis=3),         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题