MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / setUpClass

Method setUpClass

tests/pending/test_layers_basic.py:18–37  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

16
17 @classmethod
18 def setUpClass(cls):
19
20 x = tf.placeholder(tf.float32, [None, 100])
21
22 n = tl.layers.InputLayer(x, name='in')
23 n = tl.layers.DenseLayer(n, n_units=80, name='d1')
24 n = tl.layers.DenseLayer(n, n_units=80, name='d2')
25
26 n.print_layers()
27 n.print_params(False)
28
29 n2 = n[:, :30]
30 n2.print_layers()
31
32 cls.n_params = n.count_params()
33 cls.all_layers = n.all_layers
34 cls.all_params = n.all_params
35 cls.shape_n = n.outputs.get_shape().as_list()
36
37 cls.shape_n2 = n2.outputs.get_shape().as_list()
38
39 @classmethod
40 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 2

print_paramsMethod · 0.80
count_paramsMethod · 0.80

Tested by

no test coverage detected