提交 29834341 编写于 作者: Y Yikai Zhang

add sum layer

上级 322d8ddf
......@@ -20,6 +20,7 @@ def to_cor():
\def\FcColor{rgb:blue,5;red,2.5;white,5}
\def\FcReluColor{rgb:blue,5;red,5;white,4}
\def\SoftmaxColor{rgb:magenta,5;black,7}
\def\SumColor{rgb:blue,5;green,15}
"""
def to_begin():
......@@ -164,6 +165,19 @@ def to_SoftMax( name, s_filer=10, offset="(0,0,0)", to="(0,0,0)", width=1.5, hei
};
"""
def to_Sum( name, offset="(0,0,0)", to="(0,0,0)", radius=2.5, opacity=0.6):
return r"""
\pic[shift={"""+ offset +"""}] at """+ to +"""
{Ball={
name=""" + name +""",
fill=\SumColor,
opacity="""+ str(opacity) +""",
radius="""+ str(radius) +""",
logo=$+$
}
};
"""
def to_connection( of, to):
return r"""
......
......@@ -15,6 +15,8 @@ arch = [
to_Pool("pool2", offset="(0,0,0)", to="(conv2-east)", height=28, depth=28, width=1),
to_SoftMax("soft1", 10 ,"(3,0,0)", "(pool1-east)", caption="SOFT" ),
to_connection("pool2", "soft1"),
to_Sum("sum1", offset="(1.5,0,0)", to="(soft1-east)", radius=2.5, opacity=0.6),
to_connection("soft1", "sum1"),
to_end()
]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册