File size: 7,980 Bytes
9410134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
{
    "RNNs": {
        "format": "ModECI MDF v0.4",
        "generating_application": "Python modeci-mdf v0.4.11",
        "metadata": {
            "preferred_duration": 50,
            "preferred_dt": 0.1
        },
        "graphs": {
            "RNNs": {
                "nodes": {
                    "input_node": {
                        "parameters": {
                            "t": {
                                "default_initial_value": 0,
                                "time_derivative": "1"
                            },
                            "amplitude": {
                                "value": [
                                    1
                                ]
                            },
                            "period": {
                                "value": [
                                    10
                                ]
                            },
                            "level": {
                                "function": "sin",
                                "args": {
                                    "variable0": "2*3.14159*t/period",
                                    "scale": "amplitude"
                                }
                            }
                        },
                        "output_ports": {
                            "out_port": {
                                "value": "level"
                            },
                            "t_out_port": {
                                "value": "t"
                            }
                        }
                    },
                    "rnn_node": {
                        "input_ports": {
                            "ext_input": {
                                "shape": [
                                    5
                                ]
                            },
                            "fb_input": {
                                "shape": [
                                    5
                                ]
                            }
                        },
                        "parameters": {
                            "M": {
                                "value": [
                                    [
                                        -0.15378707975107808,
                                        0.961528396769231,
                                        0.3696594771697266,
                                        -0.03813619703127813,
                                        -0.21576496361169895
                                    ],
                                    [
                                        -0.3136439676982612,
                                        0.45809941476808325,
                                        -0.12285551064075118,
                                        -0.8806442067808633,
                                        -0.20391148933913716
                                    ],
                                    [
                                        0.4759908114640714,
                                        -0.635016539093,
                                        -0.6490964877050149,
                                        0.06310274768367674,
                                        0.06365517419373212
                                    ],
                                    [
                                        0.2688019171026421,
                                        0.6988635881555791,
                                        0.4489106497212705,
                                        0.22204702135516574,
                                        0.4448867651404431
                                    ],
                                    [
                                        -0.3540821722936436,
                                        -0.2764226887553718,
                                        -0.5434735382420888,
                                        -0.41257190722234127,
                                        0.2619522477089755
                                    ]
                                ]
                            },
                            "g": {
                                "value": 1.5
                            },
                            "x": {
                                "default_initial_value": [
                                    0.3929383711957233,
                                    -0.42772133009924107,
                                    -0.5462970928715938,
                                    0.10262953816578246,
                                    0.43893793957112615
                                ],
                                "time_derivative": "-x + g*int_fb + ext_input"
                            },
                            "r": {
                                "function": "tanh",
                                "args": {
                                    "variable0": "x",
                                    "scale": 1
                                }
                            },
                            "int_fb": {
                                "function": "MatMul",
                                "args": {
                                    "A": "M",
                                    "B": "r"
                                }
                            }
                        },
                        "output_ports": {
                            "out_port_x": {
                                "value": "x"
                            },
                            "out_port_r": {
                                "value": "r"
                            }
                        }
                    },
                    "readout_node": {
                        "input_ports": {
                            "input": {
                                "shape": [
                                    5
                                ]
                            }
                        },
                        "parameters": {
                            "wr": {
                                "value": [
                                    1.0,
                                    1.0,
                                    1.0,
                                    1.0,
                                    1.0
                                ]
                            },
                            "zi": {
                                "function": "MatMul",
                                "args": {
                                    "A": "input",
                                    "B": "wr"
                                }
                            }
                        },
                        "output_ports": {
                            "z": {
                                "value": "zi"
                            }
                        }
                    }
                },
                "edges": {
                    "input_edge": {
                        "sender": "input_node",
                        "receiver": "rnn_node",
                        "sender_port": "out_port",
                        "receiver_port": "ext_input",
                        "parameters": {
                            "weight": [
                                1.0,
                                0.0,
                                0.0,
                                0.0,
                                0.0
                            ]
                        }
                    },
                    "readout_edge": {
                        "sender": "rnn_node",
                        "receiver": "readout_node",
                        "sender_port": "out_port_r",
                        "receiver_port": "input",
                        "parameters": {
                            "weight": 1
                        }
                    }
                }
            }
        }
    }
}