n.conv2 = L.Convolution(n.pool1, kernel_size=5, num_output=48,
    weight_filler=dict(type='xavier'))
n.pool2 = L.Pooling(n.conv2, kernel_size=2, stride=2, pool=P.Pooling.MAX)
n.conv3 = L.Convolution(n.pool2, kernel_size=4, num_output=48,
    weight_filler=dict(type='xavier'))
n.pool3 = L.Pooling(n.conv3, kernel_size=2, stride=2, pool=P.Pooling.MAX)
n.conv4 = L.Convolution(n.pool3, kernel_size=2, num_output=48,
    weight_filler=dict(type='xavier'))
n.pool4 = L.Pooling(n.conv4, kernel_size=2, stride=2, pool=P.Pooling.MAX)
n.fc1 = L.InnerProduct(n.pool4, num_output=50, weight_filler=dict(type=
    'xavier'))
n.drop1 = L.Dropout(n.fc1, dropout_param=dict(dropout_ratio=0.5))
n.score = L.InnerProduct(n.drop1, num_output=2, weight_filler=dict(type=
    'xavier'))
if lmdb is None:
    n.prob = L.SoftMax(n.score)
else:
    n.loss = L.SoftmaxWithLoss(n.score, n.label)
return n.to_proto()
Как программно сгенерировать deploy.txt для caffe в python