摘要:
a=np.ones((4,2,2,3))print(a.shape)b=a[...,0]*a[...,2] # 这样可以降维度print(b.shape)c=a[...,0:1]*a[...,1:2] # 若0:1这里为这样就不会降维度print(c.shape) 阅读全文
摘要:
a=np.array([[[[1],[2],[3]],[[4],[25],[6]]],[[[27],[8],[99]],[[10],[11],[12]]],[[[13],[14],[15]],[[16],[17],[18]]],[[[14],[24],[15]],[[6],[197],[18]]]])print(a)print(a.shape)b=tf.reduce_max(a, axis=-1) 阅读全文