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

main.py #32

Open
Bruce-W12138 opened this issue Dec 24, 2024 · 2 comments
Open

main.py #32

Bruce-W12138 opened this issue Dec 24, 2024 · 2 comments

Comments

@Bruce-W12138
Copy link

您好作者,这个训练代码是否有问题,我按照您给出的方式设置了trainA和trainB但是仍然报错
‘Traceback (most recent call last):
File "D:\WorkProject\Image_Enhancement\night-enhancement-main\ENHANCENET.py", line 156, in train
real_A, _ = trainA_iter.next()
UnboundLocalError: local variable 'trainA_iter' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\WorkSoftware\Install\PyCharm Community Edition 2024.1.3\plugins\python-ce\helpers\pydev\pydevd.py", line 1546, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\WorkSoftware\Install\PyCharm Community Edition 2024.1.3\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\WorkProject\Image_Enhancement\night-enhancement-main\main.py", line 75, in
main()
File "D:\WorkProject\Image_Enhancement\night-enhancement-main\main.py", line 71, in main
gan.train()
File "D:\WorkProject\Image_Enhancement\night-enhancement-main\ENHANCENET.py", line 159, in train
real_A, _ = trainA_iter.next()
AttributeError: '_SingleProcessDataLoaderIter' object has no attribute 'next'’

@Bruce-W12138
Copy link
Author

我大概知道这个问题的原因了,还有最后一个问题想请教您,如果我要用新的light-effects数据集是否只需要获得J-init 即可作为trainB然后input作为trainA就可以进行训练了。那么testA和testB是用decomposition3获得的吗?还是说您的工作无法一步完成对光效应的抑制然后再做增强?

@jinyeying
Copy link
Owner

我大概知道这个问题的原因了,还有最后一个问题想请教您,如果我要用新的light-effects数据集是否只需要获得J-init 即可作为trainB然后input作为trainA就可以进行训练了。那么testA和testB是用decomposition3获得的吗?还是说您的工作无法一步完成对光效应的抑制然后再做增强?

trainB有normal light,trainA是low light,就可以完成对光效应的抑制和增强,主要看你数据怎么构造

@jinyeying jinyeying reopened this Jan 25, 2025
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