Updated layer templates for Input and Output

parent 708625a4
......@@ -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} = mx.symbol.reshape(data=${element.name}, <#-- TODO: check how to adapt CNNArchLang transpose case -->
${element.name}, _ = model.net.Reshape('${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>
......@@ -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
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