Pytorch建立神经网络

Posted by LemonWhale on April 23, 2023

卷积前后的大小变化可由以下公式得到:

Input:(N,Cin,Hin,Win)or(Cin,Hin,Win) Output:(N,Cout ,Hout ,Wout )or(Cout ,Hout ,Wout ) Hout=[Hin+2×padding[0]dliation[0]×(kernel\_size[0]1)1stride[0]+1] Wout=[Win+2×padding[1]dliation[0]×(kernel\_size[1]1)1stride[1]+1]