lei-kun / end-to-end-drl-for-fjsp Goto Github PK
View Code? Open in Web Editor NEWThis is the official code of the publised paper 'A Multi-action Deep Reinforcement Learning Framework for Flexible Job-shop Scheduling Problem'
License: MIT License
This is the official code of the publised paper 'A Multi-action Deep Reinforcement Learning Framework for Flexible Job-shop Scheduling Problem'
License: MIT License
30系列显卡不兼容cuda9.0,但是pytorch1.4对应的cuda的版本是9.0或者10.0,3070显卡主要支持cuda11,这个怎么解决
请问如何将训练好的模型在更大或者更小的instance上进行测试,调试的时候一直报错。
Why is the size of your FJSPDataset
(num_samples
, n_jobs
, n_machines
, n_machines
) ? The dataset represents how much time each job needs at least at each machine so (num_samples
, n_jobs
, n_machines
) should be enough, correct?
作者您好,非常荣幸可以读到你的代码
但是我十分想将FIFO_EET调度规则加入到代码中,但是我调式了好几天发现并不能行通
可以看看您之前写的源码或者给我点指导吗
非常抱歉在这个时刻打扰到你,很荣幸阅读你的论文,从中受到了很多启发。但是我在使用你的源码去实验的过程中遇见了一些问题,希望能请教一下你。在使用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".
1.使用validation验证给出的训练模型,得到的结果只有一个简单的tenseor数据,数据的意义是什么、
2.真实数据代码部分,validation_realWorld报错,内容如下
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".
3.真实数据训练模型时,显示No module named 'FJSP_Env1',只看到了FJSP_Env,遗漏了文件吗?
改成FJSP_Env,报错:TypeError: init() missing 1 required positional argument: 'EachJob_num_operation'
你好,感谢分享代码,我在断点修改的时候发现如下代码存在问题:
我猜测这里应该改成self.first_col[i]和self.last_col[i], 经测试后两者赋值的效果是一致的。
Could you please add a MIT license, so that I can reuse your incredible repo?
Thanks alot
想问下代码环境中的mask,mch_mask,fea,LBm,imput_min这部分的定义是什么含义。
@leikun-starting Thank you very much!
I have some questions in regard to the critic, maybe from there some improvements arise.
job_v_loss = self.MSE(val[j], rewards_all_env[j])
作者您好,很荣幸能读到您的论文。我注意到您在FJSP_RealWorld文件中将环境文件FJSP_env的FJSP类的输入改为"def [init(self,n_j,n_m,EachJob_num_operation):",但是在训练文件中输入依然为n_j和n_m,代码段如下所示。我一开始没有注意到这个问题,直到运行该文件报错。请问您是如何训练的呢?
` for epoch in range(epochs):
memory = Memory()
ppo.policy_old_job.train()
ppo.policy_old_mch.train()
times, losses, rewards2, critic_rewards = [], [], [], []
start = time.time()
costs = []
losses, rewards, critic_loss = [], [], []
for batch_idx, batch in enumerate(data_loader):
env = FJSP(configs.n_j, configs.n_m)`
抱歉打扰,在我运行您的代码时,报错runtimeerror: cuda out of memory,我通过降低batch size,换显存更大的GPU运行都无法解决,请问这应该检查什么部分或者如何解决呢?谢谢
I can see the point to use directed arcs to resemble the sequence of operations in each job. But later you Calculate the score for an operation at the beginning of the job, so the information from later operations of this job could also be helpful to get the true priority.
So maybe undirected arcs could improve the performance further. To distinguish them from the machine arcs maybe you could use different type of arcs to update the nodes in the graph.
您好,我电脑没有cuda再跑validation_realWorld.py出现了问题,请问没有cuda需要修改那些才可以运行。十分感谢。
请问测试结果tensor[]后的平均时间Cmax是论文中的Obj.时间吗?如果是的话
我测试了预训练模型FJSP_J20M20的时间和论文中Obj.时间的不一致。请问是什么原因?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.