如何在TensorFlow中置入光明?
我能够缩小张量的偏移:我可以在Pytorch中做到这一点!但是不在张量之类的地方!
A = torch.rand(1, 2,5)
A = A.permute(0,2,1)
A.shape
Torch.Size([1,5,2])
TensorFlow(只是尝试一下,我不知道):
A = tf.random.normal(1, 2,5)
A = tf.keras.layers.Permute((0, 2, 1))
不工作
I am able to permute the dimmension of the tensor: I'm able to do this in pytorch! But not in tensorflow!
A = torch.rand(1, 2,5)
A = A.permute(0,2,1)
A.shape
torch.Size([1, 5, 2])
Tensorflow (just a try,I don't know about this):
A = tf.random.normal(1, 2,5)
A = tf.keras.layers.Permute((0, 2, 1))
Not working
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
TF.Transpose
:Use
tf.transpose
: