Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab 如何从caffe中的hdf5输入获取输出?_Matlab_Caffe_Hdf5 - Fatal编程技术网

Matlab 如何从caffe中的hdf5输入获取输出?

Matlab 如何从caffe中的hdf5输入获取输出?,matlab,caffe,hdf5,Matlab,Caffe,Hdf5,我为下面定义的网络提供了hdf5文件 name: "match_layers" layers { name: "data" type: HDF5_DATA top: "feat1" top: "feat2" hdf5_data_param { source: "vgg16_train_test_pair.h5list" batch_size: 50 } } l

我为下面定义的网络提供了hdf5文件

    name: "match_layers"
    layers {
      name: "data"
      type: HDF5_DATA
      top: "feat1"
      top: "feat2"
      hdf5_data_param {
        source: "vgg16_train_test_pair.h5list"
        batch_size: 50
      }
    }

    layers {
      name: "concat"
      bottom: "feat1"
      bottom: "feat2"
      top: "union"
      type: CONCAT
        concat_param{
        concat_dim: 1
      }
    }  

    layers {
      bottom: "union"
      top: "fc1"
      name: "fc1"
      type: INNER_PRODUCT
      inner_product_param {
      num_output: 1024
    }

    .......
vgg16列车测试对列表中的内容是:

     vgg16_train_test_pair.h5
而且hdf5文件已经存在,我想使用matlab接口获得fc1的输出,我尝试了:

     net = caffe.Net(model, weights, 'test');
     a = net.forward();
     fc1 = net.blobs('fc1').get_data();

但它不起作用,任何人都可以帮我修复它吗?

你能详细说明你的错误吗?另外,如果代码是
net.blobs('fc1').get_data()
?@Prophetices我修复了
net.blobs('fc1').get_data()中的错误。当它运行到
net.forward()
时,它报告了一个错误,因为我的输入是在带有vgg16\u train\u test\u pair.h5list的prototxt文件中预定义的,所以我不知道如何为
net.forward()
提供输入。您能详细说明一下您遇到了什么错误吗?另外,如果代码是
net.blobs('fc1').get_data()
?@Prophetices我修复了
net.blobs('fc1').get_data()中的错误。当它运行到
net.forward()
时,它报告了一个错误,因为我的输入是在带有vgg16\u train\u test\u pair.h5list的prototxt文件中预定义的,所以我不知道如何为
net.forward()
提供输入。