Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Neural net 2d representation.

Discussion in 'ML-Agents' started by m4l4, Jan 15, 2021.

  1. m4l4

    m4l4

    Joined:
    Jul 28, 2020
    Posts:
    81
    Hi everyone, i know that this is probably the wrong forum to ask such a question, but i'm pretty sure that some of you had my same exact problem, and may lead me to a solution.

    I want to click on my agent, and have his brain displayed onto a 2d panel in the upper right corner of the screen. Looked at some tutorials about making graphs and some UI, but they all seems too overcomplicated for such a simple result.

    I find it both funny and weird, that i'm able to design, setup and train, complex 3d agents, but i can't draw a bunch of colored circles and lines.

    Have you ever made an UI to display NN? is it really such a complicated issue in unity?
     
  2. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473
  3. vincentpierre

    vincentpierre

    Unity Technologies

    Joined:
    May 5, 2017
    Posts:
    160
    If you have a ONNX model, you can use https://netron.app/ to visualize the network and how all the pieces are connected together. I wonder what the use cases of visualizing the network in Unity would be, can you describe what you have in mind?
     
    celion_unity likes this.
  4. celion_unity

    celion_unity

    Unity Technologies

    Joined:
    Jun 12, 2019
    Posts:
    289
    Note that Netron also works for Barracuda (.nn) files.
     
  5. m4l4

    m4l4

    Joined:
    Jul 28, 2020
    Posts:
    81
    thanks for your replies.
    My actual projects involves a custom implementation of the NEAT algorithm. To make it work, i had to write a simple feedforward net, so i'm not using barrarcuda nor the unity ml functions.

    Everything revolves around the concept of genome.
    I have a list of node genes (neurons) and a list of connections genes (weighted connections), that describe the net topology. From there i generate the neural net, and i'd also like to generate a 2d depiction of it.

    I've never worked with 2d nor UI, and i find graph tutorials to be way more complex than i expected.
    Nothing impossible, but there must be an easy way to just draw 2d circles and lines on a panel.