Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: invalid index to scalar variable. #9

Open
ChouHuaZi opened this issue Mar 9, 2023 · 1 comment
Open

IndexError: invalid index to scalar variable. #9

ChouHuaZi opened this issue Mar 9, 2023 · 1 comment

Comments

@ChouHuaZi
Copy link

Traceback (most recent call last):
File "D:\微信文件夹\WeChat Files\wxid_iknyrh9pnzs422\FileStorage\File\2023-03\pso_1.py", line 142, in
nn.train(case,label,a1,a2)
File "D:\微信文件夹\WeChat Files\wxid_iknyrh9pnzs422\FileStorage\File\2023-03\bp.py", line 135, in train
error += self.back_propagate(case, label, learn, correct)
File "D:\微信文件夹\WeChat Files\wxid_iknyrh9pnzs422\FileStorage\File\2023-03\bp.py", line 99, in back_propagate
error = label[o] - self.output_cells[o]
IndexError: invalid index to scalar variable.

@SuGuilin
Copy link

请问您是如何解决了,我也遇到同样的问题@ChouHuaZi

Traceback (most recent call last): File "D:\微信文件夹\WeChat Files\wxid_iknyrh9pnzs422\FileStorage\File\2023-03\pso_1.py", line 142, in nn.train(case,label,a1,a2) File "D:\微信文件夹\WeChat Files\wxid_iknyrh9pnzs422\FileStorage\File\2023-03\bp.py", line 135, in train error += self.back_propagate(case, label, learn, correct) File "D:\微信文件夹\WeChat Files\wxid_iknyrh9pnzs422\FileStorage\File\2023-03\bp.py", line 99, in back_propagate error = label[o] - self.output_cells[o] IndexError: invalid index to scalar variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants