Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2MXNet
Commits
8ac5c90c
Commit
8ac5c90c
authored
Jun 12, 2018
by
Svetlana
Browse files
Fixed std namespace prefix for vectors in predictor template
parent
aaa745b1
Pipeline
#55114
passed with stages
in 2 minutes and 2 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/templates/CNNPredictor.ftl
View file @
8ac5c90c
...
...
@@ -28,8 +28,8 @@ public:
if
(
handle
)
MXP
redFree
(
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
>
MXP
redSetInput
(
handle
,
"data"
,
$
{
inputName
}
.data
(),
$
{
inputName
}
.size
())
;
//
MXP
redSetInput
(
handle
,
"${inputName}"
,
$
{
inputName
}
.data
(),
$
{
inputName
}
.size
())
;
...
...
src/test/resources/target_code/CNNPredictor_Alexnet.h
View file @
8ac5c90c
...
...
@@ -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());
...
...
src/test/resources/target_code/CNNPredictor_CifarClassifierNetwork.h
View file @
8ac5c90c
...
...
@@ -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());
...
...
src/test/resources/target_code/CNNPredictor_VGG16.h
View file @
8ac5c90c
...
...
@@ -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());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment