Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
CNNArchLang
Commits
f04f2298
Commit
f04f2298
authored
Sep 12, 2019
by
Christian Fuß
Browse files
adjusted ArgMax CoCo to allow ArgMax usage before (LSTM) states
parent
08aeee32
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/cnnarch/_cocos/CheckArgmaxLayer.java
View file @
f04f2298
...
...
@@ -35,7 +35,7 @@ public class CheckArgmaxLayer extends CNNArchSymbolCoCo {
}
public
void
checkArgmaxBeforeOutput
(
LayerSymbol
layer
)
{
if
(!(
layer
.
getOutputElement
().
get
()
instanceof
VariableSymbol
&&
((
VariableSymbol
)
layer
.
getOutputElement
().
get
()).
getType
()
==
VariableSymbol
.
Type
.
IO
)){
if
(!(
layer
.
getOutputElement
().
get
()
instanceof
VariableSymbol
)){
Log
.
error
(
"0"
+
ErrorCodes
.
ILLEGAL_LAYER_USE
+
" ArgMax Layer must be applied directly before an output symbol."
);
}
}
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/predefined/Embedding.java
View file @
f04f2298
...
...
@@ -90,10 +90,10 @@ public class Embedding extends PredefinedLayerDeclaration {
ASTElementType
domain
=
layer
.
getInputTypes
().
get
(
0
).
getDomain
();
if
(!
domain
.
isWholeNumber
()
&&
!
domain
.
isNaturalNumber
())
{
/*
if (!domain.isWholeNumber() && !domain.isNaturalNumber()) {
Log.error("0" + ErrorCodes.INVALID_ELEMENT_INPUT_DOMAIN + " Invalid layer input domain: Input must be natural. ", layer.getSourcePosition());
}
else
if
(!
domain
.
isPresentRange
()
||
domain
.
getRange
().
hasNoUpperLimit
())
{
else
*/
if
(!
domain
.
isPresentRange
()
||
domain
.
getRange
().
hasNoUpperLimit
())
{
Log
.
error
(
"0"
+
ErrorCodes
.
INVALID_ELEMENT_INPUT_DOMAIN
+
" Invalid layer input domain: Input range must have an upper limit. "
,
layer
.
getSourcePosition
());
}
else
if
(
domain
.
getRange
().
getStartValue
().
intValue
()
<
0
||
domain
.
getRange
().
getEndValue
().
intValue
()
>=
inputDim
)
{
...
...
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