File:Ann dependency (graph).svg

2013-04-01 11:38:23

Description
English: Dependency graph for an artificial neural network
Date
Source Vector version of File:Ann dependency graph.png
Author Glosser.ca
SVG development
InfoField
Source code
InfoField

Asymptote code

size(5cm);
import graph;

pair circleEdge(real radius, pair p1, pair p2) {
    return p2 - radius*unit(p2 - p1);
}

void drawArrow(real radius, pair p1, pair p2) {
    pair hshift = (radius, 0),
    initial = p1 + hshift, final = circleEdge(radius, initial, p2);
    draw(initial--final, Arrow);
}


int dx = 4, dy = 2;
int radius = 1;

pair x0 = (0,0),
     h1 = (dx, 2*dy), h2 = (dx,0), h3 = (dx, -2*dy),
     g1 = (2*dx, dy), g2 = (2*dx, -dy),
     f0 = (3*dx, 0);

draw(Circle(x0, radius)); label("$x$", x0);

draw(Circle(h1, radius)); label("$h_1$", h1);
draw(Circle(h2, radius)); label("$h_2$", h2);
draw(Circle(h3, radius)); label("$h_3$", h3);

draw(Circle(g1, radius)); label("$g_1$", g1);
draw(Circle(g2, radius)); label("$g_2$", g2);

draw(Circle(f0, radius)); label("$f$", f0);


drawArrow(radius, x0, h1);
drawArrow(radius, x0, h2);
drawArrow(radius, x0, h3);

drawArrow(radius, h1, g1);
drawArrow(radius, h2, g1);
drawArrow(radius, h2, g2);
drawArrow(radius, h3, g2);

drawArrow(radius, g1, f0);
drawArrow(radius, g2, f0);

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-3.0#Ann%20dependency%20(graph).svg
Category:Self-published work Category:Artificial neural networks
Category:Artificial neural networks Category:CC-BY-SA-3.0 Category:Self-published work Category:Valid SVG created with Asymptote code