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
4fa36a95
Commit
4fa36a95
authored
Aug 16, 2019
by
Sebastian Nickels
Browse files
Added Embedding layer
parent
a221923c
Changes
3
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
4fa36a95
...
...
@@ -17,7 +17,7 @@
<!-- .. SE-Libraries .................................................. -->
<CNNArch.version>
0.3.3-SNAPSHOT
</CNNArch.version>
<CNNTrain.version>
0.3.6-SNAPSHOT
</CNNTrain.version>
<CNNArch2X.version>
0.0.
3
-SNAPSHOT
</CNNArch2X.version>
<CNNArch2X.version>
0.0.
4
-SNAPSHOT
</CNNArch2X.version>
<embedded-montiarc-math-opt-generator>
0.1.4
</embedded-montiarc-math-opt-generator>
<EMADL2PythonWrapper.version>
0.0.2-SNAPSHOT
</EMADL2PythonWrapper.version>
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/gluongenerator/CNNArch2GluonLayerSupportChecker.java
View file @
4fa36a95
...
...
@@ -26,6 +26,7 @@ public class CNNArch2GluonLayerSupportChecker extends LayerSupportChecker {
supportedLayerList
.
add
(
AllPredefinedLayers
.
RNN_NAME
);
supportedLayerList
.
add
(
AllPredefinedLayers
.
LSTM_NAME
);
supportedLayerList
.
add
(
AllPredefinedLayers
.
GRU_NAME
);
supportedLayerList
.
add
(
AllPredefinedLayers
.
EMBEDDING_NAME
);
}
}
src/main/resources/templates/gluon/elements/Embedding.ftl
0 → 100644
View file @
4fa36a95
<#
assign
input = element.inputs[0]>
<#
if
mode == "ARCHITECTURE_DEFINITION">
self.$
{
element
.name
}
= gluon.nn.Embedding(input_dim=$
{
element
.inputDim
?
c
}
, output_dim=$
{
element
.outputDim
?
c
}
)
<#include "OutputShape.ftl">
<#
elseif
mode == "FORWARD_FUNCTION">
$
{
element
.name
}
= self.$
{
element
.name
}
($
{
input
}
)
</#
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