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
bcf425cb
Commit
bcf425cb
authored
Apr 15, 2019
by
Sebastian Nickels
Browse files
Added RNNsearch.cnna in invalid tests, still subject to change
parent
3d9809dd
Pipeline
#118677
failed with stages
in 12 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/resources/invalid_tests/RNNsearch.cnna
0 → 100644
View file @
bcf425cb
package
RNNsearch
;
architecture
RNNsearch
(
max_length
=
50
,
vocabulary_size
=
30001
,
embedding_size
=
620
,
hidden_size
=
1000
){
def
input
Q
^{
max_length
,
vocabulary_size
}
source
def
output
Q
^{
max_length
,
vocabulary_size
}
target
layer
GRU
(
units
=
hidden_size
,
bidirectional
=
true
)
encoder
;
source
->
Embedding
(
input
=
vocabulary_size
,
output
=
embedding_size
)
->
encoder
->
FullyConnected
(
units
=
hidden_size
,
flatten
=
false
)
->
encoder
.
output
;
layer
GRU
(
units
=
hidden_size
)
decoder
;
1
->
OneHot
(
n
=
vocabulary_size
)
->
target
[
0
];
encoder
.
state
[
1
]
->
decoder
.
state
;
unroll
<
t
>
BeamSearchStart
(
width
=
5
,
max_length
=
50
)
->
(
(
(
decoder
.
state
->
Repeat
(
n
=
max_length
,
dim
=
1
)
|
encoder
.
output
)
->
Concatenate
(
dim
=
2
)
->
FullyConnected
(
units
=
hidden_size
,
flatten
=
false
)
->
Tanh
()
->
FullyConnected
(
units
=
max_length
)
->
Softmax
()
|
encoder
.
output
)
->
Dot
()
|
target
[
t
-
1
]
->
Embedding
(
input
=
vocabulary_size
,
output
=
hidden_size
)
)
->
Concatenate
()
->
decoder
->
FullyConnected
(
units
=
vocabulary_size
)
->
ArgMax
()
->
OneHot
(
n
=
vocabulary_size
)
->
target
[
t
]
->
BeamSearchEnd
();
}
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