MCPcopy
hub / github.com/ddbourgin/numpy-ml / _build_decoder

Method _build_decoder

numpy_ml/neural_nets/models/vae.py:191–208  ·  view source on GitHub ↗

MLP decoder FC1 -> ReLU -> FC2 -> Sigmoid

(self)

Source from the content-addressed store, hash-verified

189 )
190
191 def _build_decoder(self):
192 """
193 MLP decoder
194
195 FC1 -> ReLU -> FC2 -> Sigmoid
196 """
197 self.decoder = OrderedDict()
198 self.decoder["FC1"] = FullyConnected(
199 act_fn=ReLU(),
200 init=self.init,
201 n_out=self.latent_dim,
202 optimizer=self.optimizer,
203 )
204 # NB. `n_out` is dependent on the dimensionality of X. we use a
205 # placeholder for now, and update it within the `forward` method
206 self.decoder["FC2"] = FullyConnected(
207 n_out=None, act_fn=Sigmoid(), optimizer=self.optimizer, init=self.init
208 )
209
210 @property
211 def parameters(self):

Callers 1

_init_paramsMethod · 0.95

Calls 3

FullyConnectedClass · 0.85
ReLUClass · 0.85
SigmoidClass · 0.85

Tested by

no test coverage detected