Perform a single contrastive divergence-`k` training update using the visible inputs `X` as a starting point for the Gibbs sampler. Parameters ---------- X : :py:class:`ndarray ` of shape `(n_ex, n_in)` Layer input, representing th
(self, X)
| 450 | } |
| 451 | |
| 452 | def CD_update(self, X): |
| 453 | """ |
| 454 | Perform a single contrastive divergence-`k` training update using the |
| 455 | visible inputs `X` as a starting point for the Gibbs sampler. |
| 456 | |
| 457 | Parameters |
| 458 | ---------- |
| 459 | X : :py:class:`ndarray <numpy.ndarray>` of shape `(n_ex, n_in)` |
| 460 | Layer input, representing the `n_in`-dimensional features for a |
| 461 | minibatch of `n_ex` examples. Each feature in X should ideally be |
| 462 | binary-valued, although it is possible to also train on real-valued |
| 463 | features ranging between (0, 1) (e.g., grayscale images). |
| 464 | """ |
| 465 | self.forward(X) |
| 466 | self.backward() |
| 467 | |
| 468 | def forward(self, V, K=None, retain_derived=True): |
| 469 | """ |