ascane / sacq-hsr

SAC-Q on Human Support Robot
MIT License
4 stars 0 forks source link

keras error #2

Open yani-rl-ai opened 4 years ago

yani-rl-ai commented 4 years ago

hi @ascane i got this following error, can you help me to solve this? i have installed all the requirements, but the hsr is not started training and the process stopped

('Capping trajectories at a max length of ', 89) /home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_dual_neural_net.py:39: UserWarning: Update your Model call to the Keras 2 API: Model(outputs=Elemwise{a..., inputs=/input_1) self.live_models[task] = ks.models.Model(input=inp, output=task_specific_layers(shared_live_out)) /home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_dual_neural_net.py:40: UserWarning: Update your Model call to the Keras 2 API: Model(outputs=Elemwise{a..., inputs=/input_1) self.fixed_models[task] = ks.models.Model(input=inp, output=task_specific_layers(shared_fixed_out)) /home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_dual_neural_net.py:39: UserWarning: Update your Model call to the Keras 2 API: Model(outputs=Softmax.0, inputs=/input_2) self.live_models[task] = ks.models.Model(input=inp, output=task_specific_layers(shared_live_out)) /home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_dual_neural_net.py:40: UserWarning: Update your Model call to the Keras 2 API: Model(outputs=Softmax.0, inputs=/input_2) self.fixed_models[task] = ks.models.Model(input=inp, output=task_specific_layers(shared_fixed_out)) Traceback (most recent call last): File "gazebohsr_sacx.py", line 40, in entropy_regularization=0.005, alpha=0.0001, fixed_steps=100) File "/home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_p_network.py", line 61, in init tasks File "/home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_dual_neural_net.py", line 31, in init self.init_models(shared_layers, task_specific_layers) File "/home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_dual_neural_net.py", line 41, in init_models self.compile_function(self.live_models[task]) File "/home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_p_network.py", line 60, in lambda model: model.compile(optimizer=ks.optimizers.Adam(alpha, clipnorm=1.0), loss=make_policy_loss(entropy_regularization)), File "/home/kubota-lab/.local/lib/python2.7/site-packages/keras/engine/training.py", line 830, in compile sample_weight, mask) File "/home/kubota-lab/.local/lib/python2.7/site-packages/keras/engine/training.py", line 429, in weighted score_array = fn(y_true, y_pred) File "/home/kubota-lab/gym-gazebo-hsr/sacq-hsr/sacx/tasked_p_network.py", line 17, in policy_loss loss = -tf.reduce_mean(tf.reduce_sum(policy (q_values - entropy_regularization tf.log(policy)), axis=1)) File "/home/kubota-lab/anaconda3/envs/hsrbgym/lib/python2.7/site-packages/tensorflow/python/ops/gen_math_ops.py", line 2326, in log "Log", x=x, name=name) File "/home/kubota-lab/anaconda3/envs/hsrbgym/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 513, in _apply_op_helper raise err TypeError: Failed to convert object of type <class 'theano.tensor.var.TensorVariable'> to Tensor. Contents: Softmax.0. Consider casting elements to a supported type.

yani-rl-ai commented 4 years ago

please help me