Commit 52770ada authored by Sebastian Nickels's avatar Sebastian Nickels

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

parent 56812e2e
Pipeline #152007 failed with stages
in 2 minutes and 36 seconds
......@@ -23,7 +23,7 @@ CAFFE2_DEFINE_string(predict_net_${tc.fileNameWithoutEnding}, "./model/${tc.comp
using namespace caffe2;
class ${tc.fileNameWithoutEnding}{
class ${tc.fileNameWithoutEnding}_0{
private:
TensorCPU input;
Workspace workSpace;
......@@ -32,11 +32,11 @@ class ${tc.fileNameWithoutEnding}{
public:
const std::vector<TIndex> input_shapes = {<#list tc.architecture.inputs as input>{1,${tc.join(input.definition.type.dimensions, ",")}}<#if input?has_next>,</#if></#list>};
explicit ${tc.fileNameWithoutEnding}(){
explicit ${tc.fileNameWithoutEnding}_0(){
init(input_shapes);
}
~${tc.fileNameWithoutEnding}(){};
~${tc.fileNameWithoutEnding}_0(){};
void init(const std::vector<TIndex> &input_shapes){
int n = 0;
......
......@@ -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>);
......
......@@ -23,7 +23,7 @@ CAFFE2_DEFINE_string(predict_net, "./model/Alexnet/predict_net.pb", "The given p
using namespace caffe2;
class CNNPredictor_Alexnet{
class CNNPredictor_Alexnet_0{
private:
TensorCPU input;
Workspace workSpace;
......@@ -32,11 +32,11 @@ class CNNPredictor_Alexnet{
public:
const std::vector<TIndex> input_shapes = {{1,3,224,224}};
explicit CNNPredictor_Alexnet(){
explicit CNNPredictor_Alexnet_0(){
init(input_shapes);
}
~CNNPredictor_Alexnet(){};
~CNNPredictor_Alexnet_0(){};
void init(const std::vector<TIndex> &input_shapes){
int n = 0;
......
......@@ -23,7 +23,7 @@ CAFFE2_DEFINE_string(predict_net, "./model/CifarClassifierNetwork/predict_net.pb
using namespace caffe2;
class CNNPredictor_CifarClassifierNetwork{
class CNNPredictor_CifarClassifierNetwork_0{
private:
TensorCPU input;
Workspace workSpace;
......@@ -32,11 +32,11 @@ class CNNPredictor_CifarClassifierNetwork{
public:
const std::vector<TIndex> input_shapes = {{1,3,32,32}};
explicit CNNPredictor_CifarClassifierNetwork(){
explicit CNNPredictor_CifarClassifierNetwork_0(){
init(input_shapes);
}
~CNNPredictor_CifarClassifierNetwork(){};
~CNNPredictor_CifarClassifierNetwork_0(){};
void init(const std::vector<TIndex> &input_shapes){
int n = 0;
......
......@@ -23,7 +23,7 @@ CAFFE2_DEFINE_string(predict_net_CNNPredictor_LeNet, "./model/LeNet/predict_net.
using namespace caffe2;
class CNNPredictor_LeNet{
class CNNPredictor_LeNet_0{
private:
TensorCPU input;
Workspace workSpace;
......@@ -32,11 +32,11 @@ class CNNPredictor_LeNet{
public:
const std::vector<TIndex> input_shapes = {{1,1,28,28}};
explicit CNNPredictor_LeNet(){
explicit CNNPredictor_LeNet_0(){
init(input_shapes);
}
~CNNPredictor_LeNet(){};
~CNNPredictor_LeNet_0(){};
void init(const std::vector<TIndex> &input_shapes){
int n = 0;
......
......@@ -23,7 +23,7 @@ CAFFE2_DEFINE_string(predict_net_CNNPredictor_VGG16, "./model/VGG16/predict_net.
using namespace caffe2;
class CNNPredictor_VGG16{
class CNNPredictor_VGG16_0{
private:
TensorCPU input;
Workspace workSpace;
......@@ -32,11 +32,11 @@ class CNNPredictor_VGG16{
public:
const std::vector<TIndex> input_shapes = {{1,3,224,224}};
explicit CNNPredictor_VGG16(){
explicit CNNPredictor_VGG16_0(){
init(input_shapes);
}
~CNNPredictor_VGG16(){};
~CNNPredictor_VGG16_0(){};
void init(const std::vector<TIndex> &input_shapes){
int n = 0;
......
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(10);
_cnn_.predict(CNNTranslator::translate(image),
_predictor_0_.predict(CNNTranslator::translate(image),
CNN_predictions);
predictions = CNNTranslator::translateToCol(CNN_predictions, std::vector<size_t> {10});
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