learn_dl
learn_dl copied to clipboard
python3 中的bp.cy
python3/bc.py 运行 总是报错 'ConstNode' object has no attribute 'set_output'
我也是,请问解决了吗
我也是的 解决了吗
ConstNode不需要设置,output恒等1. 程序中Layer这个类里边的set_output(self, data): 中 for i in range(len(data)): self.nodes[i].set_output(data[i]) 改为 for i in range(len(self.nodes)): self.nodes[i].set_output(data[i]),其他的类似constnode爆出的错误,也是因为这个原因产生的,依次修改即可。
main中的每层的node数设错了 if name == 'main': 中 net = Network([6, 4, 2]) 参考之前的bp 和 fc应该是 net = Network([8, 3, 8]) 这样是跑通的别的还不确认