Ml-agents: TensorFlowSharp Unity "'TensorflowSharp' does not exist in the current context"

Created on 5 Mar 2019  路  4Comments  路  Source: Unity-Technologies/ml-agents

I'm new to using TensorFlowSharp. I'm trying to work in Unity with Image Classification, but this is the error that keeps coming up. I did find a similar thread over here: https://github.com/migueldeicaza/TensorFlowSharp/issues/379
I have the exact same problem as the one in issue mentioned above.

But the solution doesn't work for me since I can't find an older version of TFSharp due to 'switching to native inference engine in new versions of ML-Agents' reason. Help will be really appreciated.

help-wanted

Most helpful comment

Hey i found the solution here:
http://upschannel.eu/watch/Q6ERFwQNkzo/MACHINE+LEARNING+and+AUGMENTED+REALITY.html
On line 27 in "Classification.cs" instead of #if UNITY_ANDROID change it to #if (UNITY_ANDROID && !UNITY_EDITOR)

All 4 comments

Perhaps, you can try using an older version of ML-Agents that does use TensorFlowSharp?

Hey i found the solution here:
http://upschannel.eu/watch/Q6ERFwQNkzo/MACHINE+LEARNING+and+AUGMENTED+REALITY.html
On line 27 in "Classification.cs" instead of #if UNITY_ANDROID change it to #if (UNITY_ANDROID && !UNITY_EDITOR)

Hey, thanks a lot! This worked.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattinjersey picture mattinjersey  路  3Comments

MarcPilgaard picture MarcPilgaard  路  3Comments

Hongsungchan picture Hongsungchan  路  3Comments

MrGitGo picture MrGitGo  路  4Comments

GuntherFox picture GuntherFox  路  3Comments