RNNencdec.cnna 510 Bytes
Newer Older
1
2
3
architecture RNNencdec {
    def input Z(0:29999)^{30} source
    def output Z(0:29999)^{1} target[30]
Christian Fuß's avatar
Christian Fuß committed
4

5
    layer GRU(units=1000) encoder;
Christian Fuß's avatar
Christian Fuß committed
6

7
    source ->
8
    Embedding(output_dim=500) ->
9
    encoder;
Christian Fuß's avatar
Christian Fuß committed
10

11
    1 -> target[0];
Christian Fuß's avatar
Christian Fuß committed
12

13
    layer GRU(units=1000) decoder;
Christian Fuß's avatar
Christian Fuß committed
14

15
    encoder.state -> decoder.state;
Christian Fuß's avatar
Christian Fuß committed
16

17
    timed<t> BeamSearch(max_length=30, width=3) {
18
        target[t-1] ->
19
        Embedding(output_dim=500) ->
20
        decoder ->
21
        FullyConnected(units=30000) ->
22
23
24
        ArgMax() ->
        target[t]
    };
25
}