Open developeralgo8888 opened 4 years ago
Hi, I managed to run the source code using Miniconda and the commands below. By the way, apparently this code doesn't include layer 1 code (CNN training mentioned in the article).
conda create --name tensorflow python=3.7
conda install tensorflow-gpu=1.15.0
conda activate tensorflow
conda install keras pandas=0.23.4 matplotlib
pip install keras-rl gym keras-radam
EDIT: you need to enforce tensorflow version. The code is not for TF 2
EDIT 2: you need an older version of pandas
EDIT 3: found a bug on main.py. Argv index is wrong in line 78 and onwards. I should be 3 instead of 4
if(sys.argv[3]=="relu"):
model.add(Dense(35,activation='relu'))
if(sys.argv[3]=="sigmoid"):
model.add(Dense(35,activation='sigmoid'))
if(sys.argv[3]=="linear"):
model.add(Dense(35,activation='linear'))
if(sys.argv[3]=="tanh"):
model.add(Dense(35,activation='tanh'))
if(sys.argv[3]=="selu"):
model.add(Dense(35,activation='selu'))
EDIT 4: I had to comment lines 108 and 109 of the file dqn.py (keras-rl package):
# if hasattr(model.output, '__len__') and len(model.output) > 1:
# raise ValueError('Model "{}" has more than one output. DQN expects a model that has a single output.'.format(model))
Hi, I managed to run the source code using Miniconda and the commands below. By the way, apparently this code doesn't include layer 1 code (CNN training mentioned in the article).
conda create --name tensorflow python=3.7 conda install tensorflow-gpu=1.15.0 conda activate tensorflow conda install keras pandas=0.23.4 matplotlib pip install keras-rl gym keras-radam
EDIT: you need to enforce tensorflow version. The code is not for TF 2
EDIT 2: you need an older version of pandas
EDIT 3: found a bug on main.py. Argv index is wrong in line 78 and onwards. I should be 3 instead of 4
if(sys.argv[3]=="relu"): model.add(Dense(35,activation='relu')) if(sys.argv[3]=="sigmoid"): model.add(Dense(35,activation='sigmoid')) if(sys.argv[3]=="linear"): model.add(Dense(35,activation='linear')) if(sys.argv[3]=="tanh"): model.add(Dense(35,activation='tanh')) if(sys.argv[3]=="selu"): model.add(Dense(35,activation='selu'))
EDIT 4: I had to comment lines 108 and 109 of the file dqn.py (keras-rl package):
# if hasattr(model.output, '__len__') and len(model.output) > 1: # raise ValueError('Model "{}" has more than one output. DQN expects a model that has a single output.'.format(model))
thank you , good suggestion
i am not sure what is needed in terms of Tensorflow and Keras versions, there is no clarity at all
Tensorflow 2.3+ which already contains keras Keras_rl ????? ( this library is mostly outdated ) instead tf-agents is much better
Can you be specific on what are the requirements in terms of library versions needed ?