module, k)

Checks both that obj.k exists and is not equal to None, x, y, rad, num_samples), fadein_length, eps)

Calculate an epsilon by fading in from zero.

  • epoch (int) – current epoch of training.
  • fadein_length (int) – number of epochs to fade in for.
  • eps (float) – the final epsilon

The correct epsilon for the current epoch, based on eps=0 and epoch zero and eps=eps at epoch fadein_length, target, topk=(1, ), exact=False)

Computes the top-k accuracy for the specified values of k

  • output (ch.tensor) – model output (N, classes) or (N, attributes) for sigmoid/multitask binary classification
  • target (ch.tensor) – correct labels (N,) [multiclass] or (N, attributes) [multitask binary]
  • topk (tuple) – for each item “k” in this tuple, this method will return the top-k accuracy
  • exact (bool) – whether to return aggregate statistics (if False) or per-example correctness (if True)

A list of top-k accuracies.

class, new_std)

Bases: sphinx.ext.autodoc.importer._MockObject

A module (custom layer) for normalizing the input to have a fixed mean and standard deviation (user-specified).

class, stop_after=None)

Bases: object

preload(), is_best, filename)

Bases: object

Computes and stores the average and current value

update(val, n=1), ranges), class_to_idx, ranges), class_to_idx, ranges)