Neural net 2d representation.

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?

My guess is you’ll need to read out Barracuda nodes. Haven’t tried that myself yet though.

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?

1 Like

Note that Netron also works for Barracuda (.nn) files.

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.