HarisIqbal88 / PlotNeuralNet

Latex code for making neural networks diagrams
MIT License
21.93k stars 2.86k forks source link

Updated to_SoftMax allowing to add a label below a box #84

Closed chrismaliszewski closed 3 years ago

chrismaliszewski commented 4 years ago

I happened to need to add a label below a box instead of the label being displayed after the box. I updated the code that allows it now:

# SoftMax
def to_SoftMax( name, s_filer=" ", n_filer=" ", offset="(0,0,0)", to="(0,0,0)", width=1.5, height=3, depth=25, opacity=0.8, caption=" " ):
    return r"""
\pic[shift={"""+ offset +"""}] at """+ to +""" 
    {Box={
        name=""" + name +""",
        caption="""+ caption +""",
        xlabel={{ """+ '"'+str(n_filer) +'", "dummy"'+ """ }},
        zlabel="""+ str(s_filer) +""",
        fill=\SoftmaxColor,
        opacity="""+ str(opacity) +""",
        height="""+ str(height) +""",
        width="""+ str(width) +""",
        depth="""+ str(depth) +"""
        }
    };
"""