From b3c7cbd03fde44de2c8802ff461946702f22f62e Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 31 Jan 2019 20:33:30 -0300 Subject: [PATCH] add add input python layer --- core/tikzeng.py | 8 ++++++-- test/unet.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/tikzeng.py b/core/tikzeng.py index a3320eb..17df4df 100644 --- a/core/tikzeng.py +++ b/core/tikzeng.py @@ -8,6 +8,7 @@ def to_head( projectpath ): \usepackage{import} \subimport{"""+ pathlayers + r"""}{init} \usetikzlibrary{positioning} +\usetikzlibrary{3d} %for including external image """ 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] """ - - # 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 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""" diff --git a/test/unet.py b/test/unet.py index 87906e2..dee71f0 100644 --- a/test/unet.py +++ b/test/unet.py @@ -10,7 +10,7 @@ arch = [ to_begin(), #input - ## code here + to_input( '../examples/fcn8s/cats.jpg' ), #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 ), -- GitLab