Commit ba58750a authored by Sebastian Nickels's avatar Sebastian Nickels

Fixed some namings so that it works with the multiple streams update in EMADL2CPP

parent 75c7713f
Pipeline #152006 failed with stages
in 2 minutes and 45 seconds
......@@ -9,7 +9,7 @@
#include <CNNBufferFile.h>
class ${tc.fileNameWithoutEnding}{
class ${tc.fileNameWithoutEnding}_0{
public:
const std::string json_file = "model/${tc.componentName}/model_newest-symbol.json";
const std::string param_file = "model/${tc.componentName}/model_newest-0000.params";
......@@ -20,11 +20,11 @@ public:
PredictorHandle handle;
explicit ${tc.fileNameWithoutEnding}(){
explicit ${tc.fileNameWithoutEnding}_0(){
init(json_file, param_file, input_keys, input_shapes, use_gpu);
}
~${tc.fileNameWithoutEnding}(){
~${tc.fileNameWithoutEnding}_0(){
if(handle) MXPredFree(handle);
}
......
......@@ -3,7 +3,7 @@
vector<float> CNN_${tc.getName(output)}(<#list shape as dim>${dim?c}<#if dim?has_next>*</#if></#list>);
</#list>
_cnn_.predict(<#list tc.architecture.inputs as input>CNNTranslator::translate(${input.name}<#if input.arrayAccess.isPresent()>[${input.arrayAccess.get().intValue.get()?c}]</#if>),
_predictor_0_.predict(<#list tc.architecture.inputs as input>CNNTranslator::translate(${input.name}<#if input.arrayAccess.isPresent()>[${input.arrayAccess.get().intValue.get()?c}]</#if>),
</#list><#list tc.architecture.outputs as output>CNN_${tc.getName(output)}<#if output?has_next>,
</#if></#list>);
......
......@@ -9,7 +9,7 @@
#include <CNNBufferFile.h>
class CNNPredictor_Alexnet{
class CNNPredictor_Alexnet_0{
public:
const std::string json_file = "model/Alexnet/model_newest-symbol.json";
const std::string param_file = "model/Alexnet/model_newest-0000.params";
......@@ -20,11 +20,11 @@ public:
PredictorHandle handle;
explicit CNNPredictor_Alexnet(){
explicit CNNPredictor_Alexnet_0(){
init(json_file, param_file, input_keys, input_shapes, use_gpu);
}
~CNNPredictor_Alexnet(){
~CNNPredictor_Alexnet_0(){
if(handle) MXPredFree(handle);
}
......
......@@ -9,7 +9,7 @@
#include <CNNBufferFile.h>
class CNNPredictor_CifarClassifierNetwork{
class CNNPredictor_CifarClassifierNetwork_0{
public:
const std::string json_file = "model/CifarClassifierNetwork/model_newest-symbol.json";
const std::string param_file = "model/CifarClassifierNetwork/model_newest-0000.params";
......@@ -20,11 +20,11 @@ public:
PredictorHandle handle;
explicit CNNPredictor_CifarClassifierNetwork(){
explicit CNNPredictor_CifarClassifierNetwork_0(){
init(json_file, param_file, input_keys, input_shapes, use_gpu);
}
~CNNPredictor_CifarClassifierNetwork(){
~CNNPredictor_CifarClassifierNetwork_0(){
if(handle) MXPredFree(handle);
}
......
......@@ -9,7 +9,7 @@
#include <CNNBufferFile.h>
class CNNPredictor_VGG16{
class CNNPredictor_VGG16_0{
public:
const std::string json_file = "model/VGG16/model_newest-symbol.json";
const std::string param_file = "model/VGG16/model_newest-0000.params";
......@@ -20,11 +20,11 @@ public:
PredictorHandle handle;
explicit CNNPredictor_VGG16(){
explicit CNNPredictor_VGG16_0(){
init(json_file, param_file, input_keys, input_shapes, use_gpu);
}
~CNNPredictor_VGG16(){
~CNNPredictor_VGG16_0(){
if(handle) MXPredFree(handle);
}
......
vector<float> CNN_predictions(10);
_cnn_.predict(CNNTranslator::translate(data),
_predictor_0_.predict(CNNTranslator::translate(data),
CNN_predictions);
predictions = CNNTranslator::translateToCol(CNN_predictions, std::vector<size_t> {10});
\ No newline at end of file
vector<float> CNN_softmax(10);
_cnn_.predict(CNNTranslator::translate(data),
_predictor_0_.predict(CNNTranslator::translate(data),
CNN_softmax);
softmax = CNNTranslator::translateToCol(CNN_softmax, std::vector<size_t> {10});
\ No newline at end of file
vector<float> CNN_predictions(1000);
_cnn_.predict(CNNTranslator::translate(data),
_predictor_0_.predict(CNNTranslator::translate(data),
CNN_predictions);
predictions = CNNTranslator::translateToCol(CNN_predictions, std::vector<size_t> {1000});
\ No newline at end of file
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