Closed ZiJINII closed 2 years ago
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day!
可以使用 paddle.reshape,文档参考 https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/reshape_cn.html#reshape
可以使用 paddle.reshape,文档参考 https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/reshape_cn.html#reshape
出现了‘numpy.int64’ object is not callable 的错误,无法解决
能定位到具体报错在哪行嘛
能定位到具体报错在哪行嘛 在最后的全连接层 def forward(self, x):
ResConv
x = x.numpy() x = x.astype("float32") x =paddle.to_tensor(x) x = self.preprocessing(x) x = self.norm1(x) x = self.TLU(x)
# Conv1
x = self.block2(x)
# Conv2
x = self.block3(x)
# Multiscale residual convolution block
x = self.block_netB(x)
# Conv3
x = self.block4(x)
# AvgPool1
x = self.pool1(x)
# Steganalysis residual block
x = self.block5(x)
# AvgPool2
x = self.pool2(x)
# Conv4
x = self.block6(x)
# AvgPool3
x = self.pool3(x)
# Conv5
x = self.block7(x)
print(x.size)
# Full Connection
x = x.reshape(x,shape=[x.size(0), -1])
x = self.ip1(x)
return x
问题已经解决了,发现是x.size的问题,感谢
### 在全连接层需要用到view函数,在paddle中找不到对应函数###