HarisIqbal88 / PlotNeuralNet

Latex code for making neural networks diagrams
MIT License
21.54k stars 2.83k forks source link

how to solve bug "restricted \write18 enabled" #133

Open pistachio0812 opened 2 years ago

pistachio0812 commented 2 years ago

code: import sys sys.path.append('../')

from pycore.tikzeng import from pycore.blocks import

arch = [ to_head('..'), to_cor(), to_begin(),

# input
to_input('../examples/fcn8s/cats.jpg'),

to_Conv("conv1", 38, 512, offset="(0, 0, 0)", to="(0, 0, 0)", height=64, depth=64, width=2, caption="Conv4_3"),
to_Pool("pool1", offset="(1, 0, 0)", to="(conv1-east)", height=32, depth=32, width=4, caption="Conv6", opacity=0.5),
to_Conv("conv2", 19, 1024, offset="(1, 0, 0)", to="(pool1-east)", height=32, depth=32, width=4, caption="Conv7"),
to_Pool("pool2", 10, 512, offset="(1, 0, 0)", to="(conv2-east)", height=16, depth=16, width=2, caption="Conv8_2", opacity=0.5),
to_Pool("pool3", 5, 256, offset="(1, 0, 0)", to="(pool2-east)", height=8, depth=8, width=1, caption="Conv9_2", opacity=0.5),
to_Pool("pool4", 3, 256, offset="(1, 0, 0)", to="(pool3-east)", height=4, depth=4, width=1, caption="Conv10_2", opacity=0.5),
to_Pool("pool5", 1, 256, offset="(1, 0, 0)", to="(pool4-east)", height=2, depth=2, width=1, caption="Conv11_2", opacity=0.5),
to_end()
]

def main(): name_file = str(sys.argv[0]).split('.')[0] to_generate(arch, name_file + '.tex')

if name == 'main': main() error: to_Pool("pool2", 10, 512, offset="(1, 0, 0)", to="(conv2-east)", height=16, depth=16, width=2, caption="Conv8_2", opacity=0.5), TypeError: to_Pool() got multiple values for argument 'offset' This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.3) (preloaded format=pdflatex.fmt) restricted \write18 enabled. entering extended mode