具有Tensorflow的Windows 10上的ML-Agent的Unity3D机器学习设置 [英] Unity3D Machine Learning Setup for ML-Agents on Windows 10 with Tensorflow
问题描述
我一直在尝试获取用于ML-Agents的Unity 3D机器学习设置在过去的几个小时内正常运行并没有运气.
I have been trying to get the Machine Learning Setup for ML-Agents for Unity 3D up and running for the past several hours, with no luck.
First I followed this video, which goes over the initial installations which are also outlined in this GitHub repository.
Next, I moved on to part 2 of the video series (here), however problems started at minute 4:48, where I realized that the tutorial was using v 0.2, while I had v 0.3.
V 0.3取消了视频中显示的PPO.ipynb
文件.一切都通过learn.py
文件完成.
V 0.3 has done away with the PPO.ipynb
file shown in the video. Everything is done through learn.py
file.
然后,我决定尝试并遵循官方的Unity安装指南:
I then decided to try and follow the official Unity installation guide:
并进入了我尚未解决的 PPO培训部分.
and got to Training with PPO section which I have not managed to resolve.
此处出现问题:文档指出:
要进行总结,请转到命令行,进入ml-agents目录并键入:
To summarize, go to your command line, enter the ml-agents directory and type:
python3 python/learn.py <env_file_path> --run-id=<run-identifier> --train
注意:如果您正在使用Anaconda,请不要忘记激活ml-agents 环境优先.
Note: If you're using Anaconda, don't forget to activate the ml-agents environment first.
我试图跑步:
python learning.py ball --run-id = ballBalance --train
python learn.py ball --run-id=ballBalance --train
但是我收到了如下警告:
but I am greeted with a number of warnings as follows:
文件"learn.py",第9行,在 从unitytrainers.trainer_controller导入TrainerController 在第1行的文件"C:\ Users **** \ Downloads \ ml-agents-master \ python \ unitytrainers__init __.py"中 从.buffer import *
File "learn.py", line 9, in from unitytrainers.trainer_controller import TrainerController File "C:\Users****\Downloads\ml-agents-master\python\unitytrainers__init__.py", line 1, in from .buffer import *
我已经尝试解决此错误消息已有一段时间了.似乎实际上已找到文件learn.py
,但由于某种原因无法正确解释该文件?
I have been trying to solve this error message for quite some time now. It seems that the file learn.py
is actually being found, but somehow not being interpreted correctly?
learn.py
的前9行:
# # Unity ML Agents
# ## ML-Agent Learning
import logging
import os
from docopt import docopt
from unitytrainers.trainer_controller import TrainerController
任何有关如何解决此问题的指南将不胜感激.愿意在需要的地方提供更多信息.上面提到的步骤应该可以复制我遇到的问题.
Any guidance on how I can solve this problem would be appreciated. Would gladly give more information where needed. The steps mentioned above should replicate the problem I am experiencing.
推荐答案
我不确定我是否解决了相同的问题.但是在我出错的某个地方,它也告诉了我关于learn.py中第9行的信息.
I am not completely sure whether I solved the same problem. But somewhere under my errors it also told me about line 9 in learn.py.
不过,我发现了这个 https://github.com/tensorflow/tensorflow/issues/18503 所以我要做的就是通过执行以下命令来安装Tensorflow版本1.5:
Nevertheless, I found this https://github.com/tensorflow/tensorflow/issues/18503 So all I did was installing tensorflow version 1.5 by executing:
pip install --upgrade --ignore-installed tensorflow-gpu==1.5
此后,它确实进行了无错操作,并且培训效果很好.
Afterwards it did run through errorless and the training worked fine.
这篇关于具有Tensorflow的Windows 10上的ML-Agent的Unity3D机器学习设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!