MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / decoder

Method decoder

examples/GAN/BEGAN.py:34–52  ·  view source on GitHub ↗
(self, z)

Source from the content-addressed store, hash-verified

32
33 @auto_reuse_variable_scope
34 def decoder(self, z):
35 l = FullyConnected('fc', z, NF * 8 * 8)
36 l = tf.reshape(l, [-1, 8, 8, NF])
37
38 with argscope(Conv2D, activation=tf.nn.elu, kernel_size=3, strides=1):
39 l = (LinearWrap(l)
40 .Conv2D('conv1.1', NF)
41 .Conv2D('conv1.2', NF)
42 .tf.image.resize_nearest_neighbor([16, 16], align_corners=True)
43 .Conv2D('conv2.1', NF)
44 .Conv2D('conv2.2', NF)
45 .tf.image.resize_nearest_neighbor([32, 32], align_corners=True)
46 .Conv2D('conv3.1', NF)
47 .Conv2D('conv3.2', NF)
48 .tf.image.resize_nearest_neighbor([64, 64], align_corners=True)
49 .Conv2D('conv4.1', NF)
50 .Conv2D('conv4.2', NF)
51 .Conv2D('conv4.3', 3, activation=tf.identity)())
52 return l
53
54 @auto_reuse_variable_scope
55 def encoder(self, imgs):

Callers 1

build_graphMethod · 0.95

Calls 3

FullyConnectedFunction · 0.85
argscopeFunction · 0.85
LinearWrapClass · 0.85

Tested by

no test coverage detected