import os
os.chdir('/home/wuwl/ResNet')
import init_path
import caffe
import numpy as np
import tools
from caffe import layers as L,params as P,to_proto
this_dir = os.path.abspath(".")
def ResNet(split):
train_data_file = this_dir + '/caffe-master/examples/cifar10/cifar10_train_lmdb'
test_data_file = this_dir + '/caffe-master/examples/cifar10/cifar10_test_lmdb'
mean_file = this_dir + '/caffe-master/examples/cifar10/mean.binaryproto'
if split == 'train':
data,labels = L.Data(source = train_data_file, #训练样本的路径
backend = P.Data.LMDB, #训练样本的格式
batch_size = 128,
ntop = 2, # 输出的数目
transform_param = dict(mean_file = mean_file,
如何编写训练测试的prototxt配置文件---以Resnet为例
最新推荐文章于 2023-03-06 17:28:56 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)