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

问题请教 #12

Open
ghost opened this issue Apr 1, 2023 · 3 comments
Open

问题请教 #12

ghost opened this issue Apr 1, 2023 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 1, 2023

非常抱歉在这个时刻打扰到你,很荣幸阅读你的论文,从中受到了很多启发。但是我在使用你的源码去实验的过程中遇见了一些问题,希望能请教一下你。在使用validation_realWorld.py时遇见了这样的问题,不知道该怎么样解决。
Traceback (most recent call last):
File "D:\End-to-end-DRL-for-FJSP-main\FJSP_RealWorld\validation_realWorld.py", line 219, in
a = test(filepath, data_file)
File "D:\End-to-end-DRL-for-FJSP-main\FJSP_RealWorld\validation_realWorld.py", line 162, in test
ppo.policy_job.load_state_dict(torch.load(job_path1))
File "D:\anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1482, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Job_Actor:
Unexpected key(s) in state_dict: "feature_extract.mlps.0.linears.0.weight", "feature_extract.mlps.0.linears.0.bias", "feature_extract.mlps.0.linears.1.weight", "feature_extract.mlps.0.linears.1.bias", "feature_extract.mlps.0.linears.2.weight", "feature_extract.mlps.0.linears.2.bias", "feature_extract.mlps.0.batch_norms.0.weight", "feature_extract.mlps.0.batch_norms.0.bias", "feature_extract.mlps.0.batch_norms.0.running_mean", "feature_extract.mlps.0.batch_norms.0.running_var", "feature_extract.mlps.0.batch_norms.0.num_batches_tracked", "feature_extract.mlps.0.batch_norms.1.weight", "feature_extract.mlps.0.batch_norms.1.bias", "feature_extract.mlps.0.batch_norms.1.running_mean", "feature_extract.mlps.0.batch_norms.1.running_var", "feature_extract.mlps.0.batch_norms.1.num_batches_tracked", "feature_extract.mlps.1.linears.0.weight", "feature_extract.mlps.1.linears.0.bias", "feature_extract.mlps.1.linears.1.weight", "feature_extract.mlps.1.linears.1.bias", "feature_extract.mlps.1.linears.2.weight", "feature_extract.mlps.1.linears.2.bias", "feature_extract.mlps.1.batch_norms.0.weight", "feature_extract.mlps.1.batch_norms.0.bias", "feature_extract.mlps.1.batch_norms.0.running_mean", "feature_extract.mlps.1.batch_norms.0.running_var", "feature_extract.mlps.1.batch_norms.0.num_batches_tracked", "feature_extract.mlps.1.batch_norms.1.weight", "feature_extract.mlps.1.batch_norms.1.bias", "feature_extract.mlps.1.batch_norms.1.running_mean", "feature_extract.mlps.1.batch_norms.1.running_var", "feature_extract.mlps.1.batch_norms.1.num_batches_tracked", "feature_extract.bn.weight", "feature_extract.bn.bias", "feature_extract.bn.running_mean", "feature_extract.bn.running_var", "feature_extract.bn.num_batches_tracked", "feature_extract.batch_norms.0.weight", "feature_extract.batch_norms.0.bias", "feature_extract.batch_norms.0.running_mean", "feature_extract.batch_norms.0.running_var", "feature_extract.batch_norms.0.num_batches_tracked", "feature_extract.batch_norms.1.weight", "feature_extract.batch_norms.1.bias", "feature_extract.batch_norms.1.running_mean", "feature_extract.batch_norms.1.running_var", "feature_extract.batch_norms.1.num_batches_tracked".

@ghost
Copy link
Author

ghost commented Apr 1, 2023

Traceback (most recent call last):
File "D:\End-to-end-DRL-for-FJSP-main\FJSP_RealWorld\PPOwithValue.py", line 468, in
main(100)
File "D:\End-to-end-DRL-for-FJSP-main\FJSP_RealWorld\PPOwithValue.py", line 319, in main
env = FJSP(configs.n_j, configs.n_m)
TypeError: init() missing 1 required positional argument: 'EachJob_num_operation'
运行PPOwithValue.py文件时出现这个错误应该怎么解决

@98twilight
Copy link

非常抱歉在这个时刻打扰到你,很荣幸阅读你的论文,从中受到了很多启发。但是我在使用你的源码去实验的过程中遇见了一些问题,希望能请教一下你。在使用validation_realWorld.py时遇见了这样的问题,不知道该怎么样解决。 Traceback (most recent call last): File "D:\End-to-end-DRL-for-FJSP-main\FJSP_RealWorld\validation_realWorld.py", line 219, in a = test(filepath, data_file) File "D:\End-to-end-DRL-for-FJSP-main\FJSP_RealWorld\validation_realWorld.py", line 162, in test ppo.policy_job.load_state_dict(torch.load(job_path1)) File "D:\anaconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1482, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Job_Actor: Unexpected key(s) in state_dict: "feature_extract.mlps.0.linears.0.weight", "feature_extract.mlps.0.linears.0.bias", "feature_extract.mlps.0.linears.1.weight", "feature_extract.mlps.0.linears.1.bias", "feature_extract.mlps.0.linears.2.weight", "feature_extract.mlps.0.linears.2.bias", "feature_extract.mlps.0.batch_norms.0.weight", "feature_extract.mlps.0.batch_norms.0.bias", "feature_extract.mlps.0.batch_norms.0.running_mean", "feature_extract.mlps.0.batch_norms.0.running_var", "feature_extract.mlps.0.batch_norms.0.num_batches_tracked", "feature_extract.mlps.0.batch_norms.1.weight", "feature_extract.mlps.0.batch_norms.1.bias", "feature_extract.mlps.0.batch_norms.1.running_mean", "feature_extract.mlps.0.batch_norms.1.running_var", "feature_extract.mlps.0.batch_norms.1.num_batches_tracked", "feature_extract.mlps.1.linears.0.weight", "feature_extract.mlps.1.linears.0.bias", "feature_extract.mlps.1.linears.1.weight", "feature_extract.mlps.1.linears.1.bias", "feature_extract.mlps.1.linears.2.weight", "feature_extract.mlps.1.linears.2.bias", "feature_extract.mlps.1.batch_norms.0.weight", "feature_extract.mlps.1.batch_norms.0.bias", "feature_extract.mlps.1.batch_norms.0.running_mean", "feature_extract.mlps.1.batch_norms.0.running_var", "feature_extract.mlps.1.batch_norms.0.num_batches_tracked", "feature_extract.mlps.1.batch_norms.1.weight", "feature_extract.mlps.1.batch_norms.1.bias", "feature_extract.mlps.1.batch_norms.1.running_mean", "feature_extract.mlps.1.batch_norms.1.running_var", "feature_extract.mlps.1.batch_norms.1.num_batches_tracked", "feature_extract.bn.weight", "feature_extract.bn.bias", "feature_extract.bn.running_mean", "feature_extract.bn.running_var", "feature_extract.bn.num_batches_tracked", "feature_extract.batch_norms.0.weight", "feature_extract.batch_norms.0.bias", "feature_extract.batch_norms.0.running_mean", "feature_extract.batch_norms.0.running_var", "feature_extract.batch_norms.0.num_batches_tracked", "feature_extract.batch_norms.1.weight", "feature_extract.batch_norms.1.bias", "feature_extract.batch_norms.1.running_mean", "feature_extract.batch_norms.1.running_var", "feature_extract.batch_norms.1.num_batches_tracked".

请问,您解决了这个问题吗

@miemiedexiaoyang
Copy link

请问,您解决了这个问题吗

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