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
CNNArch2Gluon
Commits
f337232c
Commit
f337232c
authored
Sep 06, 2019
by
Sebastian Nickels
Browse files
Fixed bug in Const layer template
parent
028ead95
Pipeline
#180752
failed with stages
in 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/templates/gluon/elements/Const.ftl
View file @
f337232c
<#
if
mode == "FORWARD_FUNCTION">
$
{
element
.name
}
= gluon.Const('$
{
element
.name
}
', $
{
element
.constValue
}
)
$
{
element
.name
}
= gluon.Const
ant
('$
{
element
.name
}
', $
{
element
.constValue
}
)
<#
elseif
mode == "PYTHON_INLINE">
$
{
element
.name
}
=
nd.array(
$
{
element
.constValue
}
)
$
{
element
.name
}
=
mx.nd.full((batch_size, 1,),
$
{
element
.constValue
}
, ctx=mx_context
)
<#
elseif
mode == "CPP_INLINE">
vector<float> $
{
element
.name
}{
$
{
element
.constValue
}}
;
</#
if
>
\ No newline at end of file
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