Fixed provisional test cases

parent b3e4b00b
Pipeline #65789 failed with stages
in 13 seconds
//CAFFE2
#ifndef CNNBUFFERFILE_H
#define CNNBUFFERFILE_H
......
<#-- CAFFE2 -->
//CAFFE2
import mxnet as mx
import logging
import os
......
<#-- CAFFE2 -->
//CAFFE2
#ifndef ${tc.fileNameWithoutEnding?upper_case}
#define ${tc.fileNameWithoutEnding?upper_case}
......@@ -16,8 +13,8 @@ class ${tc.fileNameWithoutEnding}{
public:
const std::string json_file = "model/${tc.fullArchitectureName}/${tc.architectureName}_newest-symbol.json";
const std::string param_file = "model/${tc.fullArchitectureName}/${tc.architectureName}_newest-0000.params";
const std::vector<std::string> input_keys = {"data"};
//const std::vector<std::string> input_keys = {${tc.join(tc.architectureInputs, ",", "\"", "\"")}};
//const std::vector<std::string> input_keys = {"data"};
const std::vector<std::string> input_keys = {${tc.join(tc.architectureInputs, ",", "\"", "\"")}};
const std::vector<std::vector<mx_uint>> input_shapes = {<#list tc.architecture.inputs as input>{1,${tc.join(input.definition.type.dimensions, ",")}}<#if input?has_next>,</#if></#list>};
const bool use_gpu = false;
......@@ -31,8 +28,8 @@ public:
if(handle) MXPredFree(handle);
}
void predict(${tc.join(tc.architectureInputs, ", ", "const vector<float> &", "")},
${tc.join(tc.architectureOutputs, ", ", "vector<float> &", "")}){
void predict(${tc.join(tc.architectureInputs, ", ", "const std::vector<float> &", "")},
${tc.join(tc.architectureOutputs, ", ", "std::vector<float> &", "")}){
<#list tc.architectureInputs as inputName>
MXPredSetInput(handle, "data", ${inputName}.data(), ${inputName}.size());
//MXPredSetInput(handle, "${inputName}", ${inputName}.data(), ${inputName}.size());
......
//CAFFE2
#ifndef CNNBUFFERFILE_H
#define CNNBUFFERFILE_H
......
......@@ -13,8 +13,8 @@ class CNNPredictor_Alexnet{
public:
const std::string json_file = "model/Alexnet/Alexnet_newest-symbol.json";
const std::string param_file = "model/Alexnet/Alexnet_newest-0000.params";
const std::vector<std::string> input_keys = {"data"};
//const std::vector<std::string> input_keys = {"data"};
const std::vector<std::string> input_keys = {"data"};
const std::vector<std::vector<mx_uint>> input_shapes = {{1,3,224,224}};
const bool use_gpu = false;
......@@ -28,8 +28,8 @@ public:
if(handle) MXPredFree(handle);
}
void predict(const vector<float> &data,
vector<float> &predictions){
void predict(const std::vector<float> &data,
std::vector<float> &predictions){
MXPredSetInput(handle, "data", data.data(), data.size());
//MXPredSetInput(handle, "data", data.data(), data.size());
......
......@@ -13,8 +13,8 @@ class CNNPredictor_CifarClassifierNetwork{
public:
const std::string json_file = "model/CifarClassifierNetwork/CifarClassifierNetwork_newest-symbol.json";
const std::string param_file = "model/CifarClassifierNetwork/CifarClassifierNetwork_newest-0000.params";
const std::vector<std::string> input_keys = {"data"};
//const std::vector<std::string> input_keys = {"data"};
const std::vector<std::string> input_keys = {"data"};
const std::vector<std::vector<mx_uint>> input_shapes = {{1,3,32,32}};
const bool use_gpu = false;
......@@ -28,8 +28,8 @@ public:
if(handle) MXPredFree(handle);
}
void predict(const vector<float> &data,
vector<float> &softmax){
void predict(const std::vector<float> &data,
std::vector<float> &softmax){
MXPredSetInput(handle, "data", data.data(), data.size());
//MXPredSetInput(handle, "data", data.data(), data.size());
......
......@@ -13,8 +13,8 @@ class CNNPredictor_VGG16{
public:
const std::string json_file = "model/VGG16/VGG16_newest-symbol.json";
const std::string param_file = "model/VGG16/VGG16_newest-0000.params";
const std::vector<std::string> input_keys = {"data"};
//const std::vector<std::string> input_keys = {"data"};
const std::vector<std::string> input_keys = {"data"};
const std::vector<std::vector<mx_uint>> input_shapes = {{1,3,224,224}};
const bool use_gpu = false;
......@@ -28,8 +28,8 @@ public:
if(handle) MXPredFree(handle);
}
void predict(const vector<float> &data,
vector<float> &predictions){
void predict(const std::vector<float> &data,
std::vector<float> &predictions){
MXPredSetInput(handle, "data", data.data(), data.size());
//MXPredSetInput(handle, "data", data.data(), data.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment