1

The problem I have is, when drawing a neural network, I'm just sending nodes and connecting them to sensors/neurons/actuators but I never have controll on where they are being drawed.

An example of a NN I'm drawing is: enter image description here

What I want to do with d3 or d3cola is, drawing on the left side of the screen the TBS_GET_INPUT which is the sensor and on the right the TBS_SEND_OUTPUT which is the actuator, so I can draw the neural network in a way it's similar to current NN drawings for example: enter image description here

I attempted settings graphs.constraints but couldn't do much. Has anyone got an idea of how to do it? How to set the constraints correctly or soemthing like that?

Regards!

Shai
  • 111,146
  • 38
  • 238
  • 371
MiGu3X
  • 119
  • 1
  • 15
  • Drop the force layout and use point scales instead. – Gerardo Furtado Jun 21 '17 at 23:54
  • By this you mean setting the position of all nodes (x, y)? If it does, I don't want to do that since I don't have the neurons/nodes separated by hidden layers and it'd be a mess! – MiGu3X Jun 21 '17 at 23:56
  • No, it won't be a mess, because you can create the scales dynamically, separating everything evenly. – Gerardo Furtado Jun 22 '17 at 00:03
  • Ok, I get you about the dynamic creation of scales, but because of the way I have the nodes information I'll never know in which layer a node will be in, what I can try is rendering nodes in the middle (I won't care were, just in between sensor & actuator) and the sensor on the left and actuator on the right. – MiGu3X Jun 22 '17 at 00:06
  • In that case, use `forceX`. Have a look at my answer here: https://stackoverflow.com/a/40943217/5768908 – Gerardo Furtado Jun 22 '17 at 00:22
  • I forgot to mention I'm using d3 v3 because of d3cola, and I can't use forceSimulation – MiGu3X Jun 22 '17 at 00:28
  • I see. It's a good idea saying that in your question. Good luck to you! – Gerardo Furtado Jun 22 '17 at 00:30
  • Hahaha wait! I'm sure I can use that example on your answer and implement it, thanks for the help mate! – MiGu3X Jun 22 '17 at 00:31

0 Answers0