Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2Caffe2
Commits
ea9e12ed
Commit
ea9e12ed
authored
Feb 01, 2019
by
Carlos Alfredo Yeverino Rodriguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated layer templates for Input and Output
parent
708625a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/main/resources/templates/caffe2/elements/Input.ftl
src/main/resources/templates/caffe2/elements/Input.ftl
+2
-3
src/main/resources/templates/caffe2/elements/Output.ftl
src/main/resources/templates/caffe2/elements/Output.ftl
+2
-2
No files found.
src/main/resources/templates/caffe2/elements/Input.ftl
View file @
ea9e12ed
...
...
@@ -9,11 +9,10 @@
${element.name} = data
<#include "OutputShape.ftl">
<#if heightIndex != channelIndex + 1 || widthIndex != heightIndex + 1>
${element.name} = mx.symbol.transpose(data=${element.name},mx.sym.var <#-- TODO: check how to adapt CNNArchLang transpose case -->
axes=(0,${tc.join(indexList, ",")}))
${element.name} = model.net.Transpose(${element.name}, '${element.name}', axes=[0,${tc.join(indexList, ",")}])
</#if>
<#if indexList?size != 3>
${element.name} = m
x.symbol.r
eshape(
data=
${element.name},
<#-- TODO: check how to adapt CNNArchLang transpose case -->
${element.name}
, _
= m
odel.net.R
eshape(
'
${element.name}
'
,
['${element.name}', '${element.name}_old_shape'],
shape=(0,${element.element.outputTypes[0].channels?c},${element.element.outputTypes[0].height?c},${element.element.outputTypes[0].width?c}))
</#if>
src/main/resources/templates/caffe2/elements/Output.ftl
View file @
ea9e12ed
...
...
@@ -4,8 +4,8 @@
<#elseif element.logisticRegressionOutput>
${element.name} = model.net.Sigmoid(${input}, '${element.name}')
<#elseif element.linearRegressionOutput>
${element.name} = mx.symbol.LinearRegressionOutput(data=${element.inputs[0]}, <#-- TODO: check how to adapt linearRegressionOutput
-->
name="
${element.name}
")
<#--Don't add L2 loss here but within the function "add_training_operators" from CNNCreator.ftl
-->
${element.name}
= ${input}
</#if>
return ${element.name}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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