A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.wikipedia.org/wiki/File:Colored_neural_network.svg below:

File:Colored neural network.svg - Wikipedia

size(0,10cm);
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);

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4