add add input python layer

This commit is contained in:
pedro
2019-01-31 20:33:30 -03:00
parent cf7f9298aa
commit b3c7cbd03f
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -8,6 +8,7 @@ def to_head( projectpath ):
\usepackage{import} \usepackage{import}
\subimport{"""+ pathlayers + r"""}{init} \subimport{"""+ pathlayers + r"""}{init}
\usetikzlibrary{positioning} \usetikzlibrary{positioning}
\usetikzlibrary{3d} %for including external image
""" """
def to_cor(): def to_cor():
@@ -31,10 +32,13 @@ def to_begin():
\tikzstyle{copyconnection}=[ultra thick,every node/.style={sloped,allow upside down},draw={rgb:blue,4;red,1;green,1;black,3},opacity=0.7] \tikzstyle{copyconnection}=[ultra thick,every node/.style={sloped,allow upside down},draw={rgb:blue,4;red,1;green,1;black,3},opacity=0.7]
""" """
# layers definition # layers definition
def to_input( pathfile, to='(-3,0,0)', width=8, height=8 ):
return r"""
\node[canvas is zy plane at x=0] (temp) at """+ to +""" {\includegraphics[width="""+ str(width)+"cm"+""",height="""+ str(height)+"cm"+"""]{"""+ pathfile +"""}};
"""
# Conv # Conv
def to_Conv( name, s_filer=256, n_filer=64, offset="(0,0,0)", to="(0,0,0)", width=1, height=40, depth=40, caption=" " ): def to_Conv( name, s_filer=256, n_filer=64, offset="(0,0,0)", to="(0,0,0)", width=1, height=40, depth=40, caption=" " ):
return r""" return r"""
+1 -1
View File
@@ -10,7 +10,7 @@ arch = [
to_begin(), to_begin(),
#input #input
## code here to_input( '../examples/fcn8s/cats.jpg' ),
#block-001 #block-001
to_ConvConvRelu( name='ccr_b1', s_filer=500, n_filer=(64,64), offset="(0,0,0)", to="(0,0,0)", width=(2,2), height=40, depth=40 ), to_ConvConvRelu( name='ccr_b1', s_filer=500, n_filer=(64,64), offset="(0,0,0)", to="(0,0,0)", width=(2,2), height=40, depth=40 ),