【论文复现】BatchNorm3D
Created by: kgkzhiwen
上面有人问过BatchNorm3D的问题,答复是直接使用BatchNorm, 输入5D tensor, 然而我尝试下面的代码,出错了。请问要如何BatchNorm 5 Dtensor?
x = np.random.random(size=(2,3, 10, 3, 7)).astype('float32') print("x:",x) with fluid.dygraph.guard(): x = to_variable(x) batch_norm = fluid.BatchNorm(10) hidden1 = batch_norm(x) #出错了 print("h:",hidden1.numpy())