pytorch的与tensorflow 2.0等效的视图是什么?

问题描述 投票:0回答:1
l_conv7 = self.loc_conv7(conv7_feats)  # (N, 24, 19, 19)
l_conv7 = l_conv7.permute(0, 2, 3, 1).contiguous()  # (N, 19, 19, 24)
l_conv7 = l_conv7.view(batch_size, -1, 4)  # (N, 2166, 4), there are a total 2116 boxes on this feature map

与TensorFlow中的割炬视图等效吗?如何在TensorFlow 2.0中更改l_conv7.view?

tensorflow pytorch tensorflow2.0 torch
1个回答
0
投票

使用l_conv7.reshape(batch_size, -1, 4)

© www.soinside.com 2019 - 2024. All rights reserved.