File:Colored neural network.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 296 × 356 pixels, file size: 206 KB)

Structured data


Add a one-line explanation of what this file represents


English: Artificial neural network with layer coloring
Deutsch: Farblich markierte Schichten eines künstlichen neuronalen Netzes
Source Own work, Derivative of File:Artificial neural network.svg
Other versions


SVG development
This vector image was created with Asymptote by dvisvgm.


import graph;

int dx = 4, dy = 3;

void interSphere(pair[] c1, pair[] c2) {
    pen whitepen = defaultpen + white + 4*linewidth(defaultpen);
    for(int i = 0; i < c1.length; ++i) {
        for(int j = 0; j < c2.length; ++j) {
            pair delta = 1.1*unit(c2[j]-c1[i]);
            draw(c1[i]+delta--c2[j]-delta, whitepen);
            draw(c1[i]+delta--c2[j]-delta, Arrow);

void unitCircs(pair[] c0, pen p = defaultpen) {
    for(int i = 0; i < c0.length; ++i) {
        draw(Circle(c0[i], 1), p);

pair[] c0 = {(0, 0), (0, dy), (0, 2*dy)},
       c1 = {(dx, -1.5), (dx, -1.5 + dy), (dx, -1.5 + 2*dy), (dx, -1.5+3*dy)},
       c2 = {(2*dx, -1.5 + dy), (2*dx, -1.5 + 2*dy)};

pen redPen = defaultpen + heavyred, 
    bluePen = defaultpen + heavyblue, 
    greenPen = defaultpen + deepgreen;
unitCircs(c0, redPen); unitCircs(c1, bluePen); unitCircs(c2, greenPen);

interSphere(c0, c1);
interSphere(c1, c2);

label("Input", (0, 2*dy + 1), N, redPen);
label("Hidden", (dx, -1.5 + 3dy + 1), N, bluePen);
label("Output", (2*dx, -1.5 + 2dy + 1), N, greenPen);

real rbox = 2*dx + 1.025;
draw((rbox,-3)--(rbox, 3), invisible);


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 alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

File history

Click on a date/time to view the file as it appeared at that time.

current18:55, 28 February 2013Thumbnail for version as of 18:55, 28 February 2013296 × 356 (206 KB) (talk | contribs)User created page with UploadWizard
  • You cannot overwrite this file.

File usage on other wikis

The following other wikis use this file: