Open aslandery opened 5 years ago
Oh boy, that code hasn't been touched in about two years!
Looks like the only constructor for ForwardNet
has zero parameters: ForwardNet()
. Could whatever code you are using be trying to pass things in? If you can't figure out what method it is trying to call, perhaps try defining a three-param constructor:
function ForwardNet(dags_in, nodes_in, name_to_index_in)
dags = dags_in
nodes = nodes_in
name_to_index = name_to_index_in
end
Hi, tawheeler,
I appreciate it a lot that you replied so soon.
I hope to implement the code of driving-with-GAIL, thus ForwardNets is called as the policy network.
Truly as you say, the constructor of ForwardNet has zero parameters. But when the code in 'load_policy.jl' tries to claim a object of ForwardNet with ForwardNet{Float32}()
, it will report the above error, as shown in attached image.
I will try your suggestions. A lot of thanks again for your answer.
ForwardNet doesn't appear to need a parameterization. Can probably drop the {Float32}
unless the definition has been changed locally on your machine.
ForwardNet{Float32}() -> ForwardNet()
What version of Julia are you using? The version on master was written from julia 0.4, which is now really old. Things need to be updated.
What version of Julia are you using? The version on master was written from julia 0.4, which is now really old. Things need to be updated.
Hi, tawheeler, Sorry for late reply. I have been working on the code and it is able to run now! I use Julia 0.5.2, python2.7. But when it comes to automotive driving, ForwardNets are reimplemented with some added gru layers, and forwardnet() is reimplemented as forwarnet{Float32}(). So for general use, removal of {Float32} is working, but for the reimplemented functions in driving, it is ok to keep {Float32}. It is my fault...I am so sorry that I didn't make it clear at beginning. I am a beginner in reinforcement learning, especially in Julia&python mixing coding for simulation. While the version is old and there are problems due to the version, I learnt much. Thanks again for your response and suggestion!
Hi, tawheeler, Thanks for the great work. But when I use the package with antomotivedrivingmodels, it reports too many params for forwardnet, even when I try with simple inputs as your example, it reports the same error. Could you help me with it?
The traceback is as following:
(d_gail_2.7)gail-driver-master *$ python train_gail_model.py