assert self.network is not None, \
"Network should have been constructed but was found to be None"
if not self.n_training_epochs:
n_updates_per_epoch = int(np.ceil(n_samples / self.batch_size))
// heuristic of ~1M updates for each model
epochs = min(2000, int(np.ceil(10 ** 5 / n_updates_per_epoch)))
else:
epochs = self.n_training_epochs
X_with_observed_mask = np.hstack([X, missing_mask])
self.network.fit(
After Change
"Network should have been constructed but was found to be None"
if not self.n_training_epochs:
actual_batch_size = min(self.batch_size, n_samples)
n_updates_per_epoch = int(np.ceil(n_samples / actual_batch_size))
// heuristic of ~1M updates for each model
epochs = int(np.ceil(0.5 * 10 ** 6 / n_updates_per_epoch))
print("Epochs: %d" % epochs)
else:
epochs = self.n_training_epochs
X_with_observed_mask = np.hstack([X, missing_mask])