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
languages
CNNArchLang
Commits
f7930368
Commit
f7930368
authored
Mar 18, 2020
by
Julian Johannes Steinsberger-Dührßen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working LargeLayer
parent
c699f746
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
61 deletions
+1
-61
src/main/java/de/monticore/lang/monticar/cnnarch/_symboltable/Constraints.java
...icore/lang/monticar/cnnarch/_symboltable/Constraints.java
+1
-0
src/main/java/de/monticore/lang/monticar/cnnarch/predefined/LargeMemory.java
...nticore/lang/monticar/cnnarch/predefined/LargeMemory.java
+0
-61
No files found.
src/main/java/de/monticore/lang/monticar/cnnarch/_symboltable/Constraints.java
View file @
f7930368
...
...
@@ -239,6 +239,7 @@ public enum Constraints {
}
return
false
;
}
@Override
protected
String
msgString
()
{
return
AllPredefinedLayers
.
MEMORY_ACTIVATION_LINEAR
+
" or "
...
...
src/main/java/de/monticore/lang/monticar/cnnarch/predefined/LargeMemory.java
deleted
100644 → 0
View file @
c699f746
/**
*
* (c) https://github.com/MontiCore/monticore
*
* The license generally applicable for this project
* can be found under https://github.com/MontiCore/monticore.
*/
/* (c) https://github.com/MontiCore/monticore */
package
de.monticore.lang.monticar.cnnarch.predefined
;
import
de.monticore.lang.monticar.cnnarch._symboltable.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
public
class
LargeMemory
extends
PredefinedLayerDeclaration
{
private
LargeMemory
()
{
super
(
AllPredefinedLayers
.
LARGE_MEMORY_NAME
);
}
@Override
public
List
<
ArchTypeSymbol
>
computeOutputTypes
(
List
<
ArchTypeSymbol
>
inputTypes
,
LayerSymbol
layer
,
VariableSymbol
.
Member
member
)
{
int
querrySize
=
layer
.
getIntValue
(
AllPredefinedLayers
.
QUERRY_SIZE_NAME
).
get
();
return
Collections
.
singletonList
(
new
ArchTypeSymbol
.
Builder
()
.
channels
(
1
)
.
height
(
querrySize
)
.
width
(
1
)
.
elementType
(
"-oo"
,
"oo"
)
.
build
());
}
@Override
public
void
checkInput
(
List
<
ArchTypeSymbol
>
inputTypes
,
LayerSymbol
layer
,
VariableSymbol
.
Member
member
)
{
errorIfInputSizeIsNotOne
(
inputTypes
,
layer
);
}
public
static
LargeMemory
create
(){
LargeMemory
declaration
=
new
LargeMemory
();
List
<
ParameterSymbol
>
parameters
=
new
ArrayList
<>(
Arrays
.
asList
(
new
ParameterSymbol
.
Builder
()
.
name
(
AllPredefinedLayers
.
NUM_SUB_KEYS_NAME
)
.
constraints
(
Constraints
.
INTEGER
,
Constraints
.
POSITIVE
)
.
build
(),
new
ParameterSymbol
.
Builder
()
.
name
(
AllPredefinedLayers
.
QUERRY_SIZE_NAME
)
.
constraints
(
Constraints
.
INTEGER
,
Constraints
.
POSITIVE
)
.
defaultValue
(
512
)
.
build
(),
new
ParameterSymbol
.
Builder
()
.
name
(
AllPredefinedLayers
.
K_NAME
)
.
constraints
(
Constraints
.
INTEGER
,
Constraints
.
POSITIVE
)
.
build
()));
declaration
.
setParameters
(
parameters
);
return
declaration
;
}
}
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