-
Notifications
You must be signed in to change notification settings - Fork 1
/
gocunets_getlayers.go
90 lines (89 loc) · 2.11 KB
/
gocunets_getlayers.go
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
package gocunets
//
///*
//
//type layer struct {
// name string
// activation *activation.Layer
// cnn *cnn.Layer
// fcnn *fcnn.Layer
// softmax *softmax.Layer
// pool *pooling.Layer
// drop *dropout.Layer
// batch *batchnorm.Layer
// reshape *reshape.Layer
// cnntranspose *cnntranspose.Layer
//}
//
//*/
//
////BatchNorms returns the batchnorm layers in the network if nil is returned none are found
//func (m *Network) BatchNorms() []*batchnorm.Layer {
// x := make([]*batchnorm.Layer, 0)
// for i := range m.layers {
// if m.layers[i].batch != nil {
// x = append(x, m.layers[i].batch)
// }
// }
// if len(x) == 0 {
// return nil
// }
// return x
//}
//
////Dropouts returns the dropout layers in the network if nil is returned none are found
//func (m *Network) Dropouts() []*dropout.Layer {
// x := make([]*dropout.Layer, 0)
// for i := range m.layers {
// if m.layers[i].drop != nil {
// x = append(x, m.layers[i].drop)
// }
// }
// if len(x) == 0 {
// return nil
// }
// return x
//}
//
////Transposes returns the tranpose convolution layers in the network if nil is returned none are found
//func (m *Network) Transposes() []*cnntranspose.Layer {
// x := make([]*cnntranspose.Layer, 0)
// for i := range m.layers {
// if m.layers[i].cnntranspose != nil {
// x = append(x, m.layers[i].cnntranspose)
// }
// }
// if len(x) == 0 {
// return nil
// }
// return x
//}
//
////Convolutions returns the convolution layers in the network if nil is returned none are found
//func (m *Network) Convolutions() []*cnn.Layer {
// x := make([]*cnn.Layer, 0)
// for i := range m.layers {
// if m.layers[i].cnn != nil {
// x = append(x, m.layers[i].cnn)
// }
// }
// if len(x) == 0 {
// return nil
// }
// return x
//}
//
////Activations returns the activation layers in the network if nil is returned none are found
//func (m *Network) Activations() []*activation.Layer {
// x := make([]*activation.Layer, 0)
// for i := range m.layers {
// if m.layers[i].activation != nil {
// x = append(x, m.layers[i].activation)
// }
// }
// if len(x) == 0 {
// return nil
// }
// return x
//}
//