MCPcopy Create free account
hub / github.com/HA-Transformer/MAT / train_step

Method train_step

fairseq/tasks/fairseq_task.py:209–234  ·  view source on GitHub ↗

Do forward and backward, and return the loss as computed by *criterion* for the given *model* and *sample*. Args: sample (dict): the mini-batch. The format is defined by the :class:`~fairseq.data.FairseqDataset`. model (~fairseq.model

(self, sample, model, criterion, optimizer, ignore_grad=False)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

trainMethod · 0.80
backwardMethod · 0.45

Tested by

no test coverage detected