Closed Lakrix closed 6 years ago
I do not run in to this error. Could you try cloning again the repo on the master
branch and try again. The banana imitation scene should be ready for use. I have never encountered this error but my best guess is that the teacher brain and student brain may have different brain parameters (continuous vs discrete vector action space).
This only happens when I use a discrete action space. When Im using a continous action space everything works fine.
'PlayerAcademy' started successfully! Unity Academy name: PlayerAcademy Number of Brains: 2 Number of External Brains : 1 Lesson number : 0 Reset Parameters :
Unity brain name: TeacherBrain Number of Visual Observations (per agent): 0 Vector Observation space type: continuous Vector Observation space size (per agent): 10 Number of stacked Vector Observation: 1 Vector Action space type: discrete Vector Action space size (per agent): 4 Vector Action descriptions: , , , Unity brain name: StudentBrain Number of Visual Observations (per agent): 0 Vector Observation space type: continuous Vector Observation space size (per agent): 10 Number of stacked Vector Observation: 1 Vector Action space type: discrete Vector Action space size (per agent): 4 Vector Action descriptions: , , ,
Did you make sure the teacher and student brains had the same parameters ? (same action space type ?)
Yes they have the same type. If the action space is continuous it works but not for discrete.
I was able to reproduce your error. I made some fixes to the trainer, changes are in this Pull Request. Let us know if it works.
Yes it works to run the it now. But after max steps I get the following error.
ddTraceback (most recent call last):
File "learn.py", line 62, in
I think version 0.3.0b resolved that issue. Let us know if you are still facing this issue.
I am closing this issue due to inactivity. Feel free to reopen it if it is still not fixed in the 0.3.0b.
Hello, I think that i have the same issue using learning by demostration. Brains have the same parameters.
This is the error message:
INFO:mlagents.envs:Hyperparameters for the OfflineBCTrainer of brain RightBrain:
trainer: offline_bc
batch_size: 256
summary_freq: 1000
max_steps: 5.0e6
batches_per_epoch: 10
use_recurrent: True
hidden_units: 256
learning_rate: 0.0003
num_layers: 3
sequence_length: 32
memory_size: 256
demo_path: nodescription_1.demo
summary_path: ./summaries/ppo_RightBrain
model_path: ./models/ppo-0/RightBrain
keep_checkpoints: 5
Traceback (most recent call last):
File "c:\users\leonardo\anaconda3\envs\ml-agents\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\leonardo\anaconda3\envs\ml-agents\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Leonardo\Anaconda3\envs\ml-agents\Scripts\mlagents-learn.exe__main__.py", line 9, in
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I'm trying to run teacher/student mode. I have followed the guide on how to set up imitation learning. When I try to run learn.py I get the following error.
loss, _ = self.sess.run([self.model.loss, self.model.update], feed_dict=feed_dict) File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 889, in run run_metadata_ptr) File "/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1096, in _run % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape()))) ValueError: Cannot feed value of shape (4, 4) for Tensor 'teacher_action:0', which has shape '(?,)'
If I switch my teacher brain to external then Im able train the brain. Im not able to have my teacher brain as player input together with my student as external input.