MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / forward

Method forward

unsupervised_class3/dcgan_tf.py:57–79  ·  view source on GitHub ↗
(self, X, reuse, is_training)

Source from the content-addressed store, hash-verified

55 self.params = [self.W, self.b]
56
57 def forward(self, X, reuse, is_training):
58 # print("**************** reuse:", reuse)
59 conv_out = tf.nn.conv2d(
60 X,
61 self.W,
62 strides=[1, self.stride, self.stride, 1],
63 padding='SAME'
64 )
65 conv_out = tf.nn.bias_add(conv_out, self.b)
66
67 # apply batch normalization
68 if self.apply_batch_norm:
69 conv_out = tf.contrib.layers.batch_norm(
70 conv_out,
71 decay=0.9,
72 updates_collections=None,
73 epsilon=1e-5,
74 scale=True,
75 is_training=is_training,
76 reuse=reuse,
77 scope=self.name,
78 )
79 return self.f(conv_out)
80
81
82class FractionallyStridedConvLayer:

Callers 2

d_forwardMethod · 0.45
g_forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected