SupervisedModel

lamp.nn.SupervisedModel
case class SupervisedModel[I, M <: GenericModule[I, Variable]](module: M & GenericModule[I, Variable], lossFunction: LossFunction, lossCalculation: LossCalculation[I], printMemoryAllocations: Boolean)(implicit tm: TrainingMode[M])

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addTotalLossAndReturnGradientsAndNumExamples(samples: I, target: STen, acc: STen, zeroGrad: Boolean): (Long, Seq[Option[STen]])
def addTotalLossAndReturnNumExamples(samples: I, target: STen, acc: STen): Long
def asEval: SupervisedModel[I, M]
def zeroGrad(): Unit
def zipOptimizer(optimizerFactory: Seq[(STen, PTag)] => Optimizer): ModelWithOptimizer[I, M]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product