Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.01k stars 4.15k forks source link

ML agents in Real World #4195

Closed Shubhamai closed 4 years ago

Shubhamai commented 4 years ago

I want to train a simple model and inference it in real-world environments & hardware like the raspberry pi.

Does unity ML-Agents can be used in a real-world environment? I think it can. But when I tried to do so, it is becoming much harder and harder to implement it in real-world, the main issue I am getting currently is that ML-Agents output model in .nn, .oonx and in .pb. I use .pb in that case but i a getting problem in inputting observations and getting the actions.

It would be helpful if anyone can just show a method to make an inference for maybe 3D ball environment .pb files and how to make inference in that using TensorFlow 2.0

nullbyte91 commented 3 years ago

@Shubhamai Did you figure it out the deployment flow from the trained model?

Shubhamai commented 3 years ago

Nope @nullbyte91, But I think I would try again soon because ML-Agents now supports PyTorch.

chriselion commented 3 years ago

Sorry this never got answered before. Using torch means that all models are output in .onnx format. You're welcome to try it, but we don't provide and support for doing inference outside of the Unity engine.

Shubhamai commented 3 years ago

awww :( . The thing is I think if ML-Agents can support the inference outside unity engine. This will make implementing reinforcement learning on real-world things ( robotics ) so so much easier @chriselion and powerful. This is my feedback for the Unity ML-Agents :)

github-actions[bot] commented 3 years ago

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.