以类的方式组件手写数字识别的网络遇到的问题
收藏
class MNIST(paddle.nn.layer):
def __init__(self):
super(MNIST,self).__init__()
self.fc = paddle.nn.linear(in_features = 784,out_features = 1)
def forward(self,inputs):
outputs = self.fc(inputs)
return outputs
照着文档打,到启动时出现
class MNIST(paddle.nn.layer):
TypeError: module() takes at most 2 arguments (3 given)
这个问题,网上也找不到解决办法
有没有大神不吝指教一下!!
万分感谢!!1
0
收藏
请登录后评论
model=paddle.Model(MNIST())
添加这句话就不会报错了