oovm / DeepMathFantasy

Mozilla Public License 2.0
4 stars 1 forks source link

Feature: Drawing a LeNet Style neural network diagram #1

Open oovm opened 5 years ago

oovm commented 5 years ago

image

oovm commented 5 years ago
squares = Table[Rectangle[{0.2a, -0.2a}], {a, 0, 10}];
styles = {
    {EdgeForm[Dashed], White},
    {RGBColor[{221, 226, 204} / 255]}
};
Graphics@Flatten@Riffle[squares, styles, {1, -2, 2}]

tim 20181130165422

oovm commented 5 years ago
ls = Sqrt[{120, 10}][[#]]&;
Graphics[{
    Gray, Parallelogram[{0, 0}, {{1, 0}, ls@1{1, -1}}],
    Gray, Parallelogram[{10, -2}, {{1, 0}, ls@2{1, -1}}],
    Dashed, Line[{{1, 0}, {10, -2}}],
    Dashed, Line[{{1 + ls@1, -ls@1}, {ls@2 + 10, -2 - ls@2}}]
}]

tim 20181130170805