module, k)

Checks both that obj.k exists and is not equal to None, x, y, rad, num_samples), 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


Bases: object

Computes and stores the average and current value

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