Use the new layer info data in the simulator.

This commit is contained in:
2018-01-02 16:31:55 +01:00
parent 470399aabf
commit 5f81f0cec2
6 changed files with 13 additions and 45 deletions

View File

@@ -9,7 +9,6 @@
#include <opencv2/imgproc/imgproc.hpp>
#include "Simulator.hpp"
#include "utils.hpp"
using namespace caffe;
using namespace std;
@@ -92,8 +91,6 @@ void Simulator::Impl::loadMeans(const string &means_file)
vector<LayerData> Simulator::Impl::simulate(const string& image_file)
{
typedef LayerData::Type LType;
cv::Mat im = cv::imread(image_file, -1);
assert(!im.empty());
@@ -115,7 +112,7 @@ vector<LayerData> Simulator::Impl::simulate(const string& image_file)
CHECK_EQ(results[i].size(), 1) << "Multiple outputs per layer are not supported!" << endl;
const auto blob = results[i][0];
result.emplace_back(names[i], blob->shape(), blob->cpu_data(), LayerData::typeFromString(layers[i]->type()));
result.emplace_back(names[i], blob->shape(), blob->cpu_data());
}
return result;