How to programmatically generate deploy.txt for caffe in python
问题 I have written python code to programmatically generate a convolutional neural network (CNN) for training and validation .prototxt files in caffe. Below is my function: def custom_net(lmdb, batch_size): # define your own net! n = caffe.NetSpec() # keep this data layer for all networks n.data, n.label = L.Data(batch_size=batch_size, backend=P.Data.LMDB, source=lmdb, ntop=2, transform_param=dict(scale=1. / 255)) n.conv1 = L.Convolution(n.data, kernel_size=6, num_output=48, weight_filler=dict