# A trick when you want to flatten a matrix X of shape (a,b,c,d) # to a matrix X_flatten of shape (b*c*d, a) is to use: a = np.random.randn(10, 5, 5, 3) ## 如a为10幅5*5*3的图像 a_flatten = a.reshape(a.shape[0], -1) print(a_flatten.shape) ## 输出为(10, 75)
CNN flatten trick
猜你喜欢
转载自blog.csdn.net/weixin_41947081/article/details/80754007
今日推荐
周排行