HarisIqbal88 / PlotNeuralNet

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

centered depth label #115

Open matthijsvk opened 2 years ago

matthijsvk commented 2 years ago

Hi,

the overleaf examples don't produce the images in the github page. Specifically the z-label is at the bottom, not at the center of the weight tensors.

image

matthijsvk commented 2 years ago

I found the solution. In layers/RightBandedBox.sty, change line 63 from this: \tikzstyle{depthlabel}=[pos=0,text width=14*\z,text centered,sloped] to: \tikzstyle{depthlabel}=[pos=0,text width=14*\z,text centered,sloped,midway]

You can do the same in Box.sty

matthijsvk commented 2 years ago

Though this can cause overlap of the z-label and subsequent layers; it would be handy to have a parameter we can set to choose where the z-label goes

AlexandreBourrieau commented 2 years ago

Not work for me by editing layers/RightBandedBox.sty Any other suggestion ?? Thanks !

2243108785 commented 2 years ago

图片中的标题想居中要修改layers文件夹下的Box.sty和RightBandedBox.sty里的pos(从0改到0.5) 45行 \tikzstyle{depthlabel}=[pos=0.5,text width=14\z,text centered,sloped]
63行 \tikzstyle{depthlabel}=[pos=0.5,text width=14
\z,text centered,sloped]