-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathInputLayer.m
41 lines (33 loc) · 1.04 KB
/
InputLayer.m
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
classdef InputLayer < Layer
%INPUTLAYER Summary of this class goes here
% Detailed explanation goes here
properties
A
end
methods
function input = InputLayer(units)
%INPUTLAYER Construct an instance of this class
% Detailed explanation goes here
input.units = units;
end
function input = init(input, nextlayer)
%METHOD1 Summary of this method goes here
% Detailed explanation goes here
input.prev_layer = 0;
input.nextlayer = nextlayer;
end
function y = forward(input, X, cache)
input.A = X;
y = input.nextlayer.forward(X, cache);
end
function backward(~, ~, ~)
end
function newlayer = move(input, newlayer)
newlayer.A = input.A;
end
function newlayer = copy(input)
newlayer = InputLayer(input.units);
input.move(newlayer);
end
end
end