SciSharp / unity-ml-agents.net

Apache License 2.0
15 stars 5 forks source link

I can't seem to get this working with the latest version of TF.Net #1

Open Phantomb opened 4 years ago

Phantomb commented 4 years ago

Is it because of the move to TF 2.0? What should be changed to make it work with 2.0?

Oceania2018 commented 4 years ago

Have you trid add tf.compat.v1.disable_eager_execution(); before you using tf.net?

Phantomb commented 4 years ago

I did add that, at the start of the LearningModel call:

public LearningModel(int? m_size = null,
            bool normalize = false,
            bool use_recurrent = false,
            BrainParameters brain = null,
            int seed = 0,
            List<string> stream_names = null)
        {
            tf.compat.v1.disable_eager_execution();

            tf.set_random_seed(seed);
            this.brain = brain;
            (global_step, increment_step, steps_to_increment) = create_global_steps();
            ...
         }

Would I need to add it anywhere else, or are there other changes I would need to make?

At first, there were also some errors thrown around the RefVariable type. In some places I changed it to ResourceVariable (since some of the methods now expect that type as input instead of RefVariable), in some places to Tensor.

Oceania2018 commented 4 years ago

We have to refactor the model adapting tensorflow 2.x. Welcome if you can contribute to this project. I would glad to help if you need.

Phantomb commented 4 years ago

Would love to, but I'm kinda lost on where to get starten / what needs to be modified. Could you provide some pointers?

samuelcaldas commented 3 years ago

We have to refactor the model adapting tensorflow 2.x. Welcome if you can contribute to this project. I would glad to help if you need.

any tips where to start?

CartBlanche commented 10 months ago

@Oceania2018 Is this project still active? If not, have you moved onto using ML.NET? A 2nd if not, how easy is it to use ML.NET to create game agents. I'd like to use ML.NET or ML Agents in an 3D game using MonoGame, but would like to use agents for the enemies, if possible.

Oceania2018 commented 10 months ago

It's not active. I'll close this repo. I'll archive this project.