-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinput_connection.e
More file actions
59 lines (47 loc) · 1003 Bytes
/
input_connection.e
File metadata and controls
59 lines (47 loc) · 1003 Bytes
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
note
description: "The connection between two {NEURON}s"
author: "Guillaume Jean"
date: "2016-06-27"
revision: "16w26"
class
INPUT_CONNECTION
inherit
INPUT
rename
value as weighted_input
export
{NONE} set_value
redefine
weighted_input,
make
end
create
make
feature {NONE} -- Initialization
make(a_initial_activation: REAL_64)
-- Initializes `Current' with `activation' set to `a_initial_activation'
do
activation := a_initial_activation
weight := 1
end
feature -- Access
weighted_input: REAL_64
-- <Precursor>
do
Result := weight * activation
end
activation: REAL_64 assign set_activation
-- Non-weighted input value of `Current'
weight: REAL_64 assign set_weight
-- Weight of `Current'
set_activation(a_new_activation: REAL_64)
-- Sets `activation' to `a_new_weight'
do
activation := a_new_activation
end
set_weight(a_new_weight: REAL_64)
-- Sets `weight' to `a_new_weight'
do
weight := a_new_weight
end
end