pulsatrix
Loading...
Searching...
No Matches
pulsatrix::MutationLoss Class Reference

Computes one of E-GAN's three named mutation objectives against a discriminator's own raw logit output, and its gradient w.r.t. those logits. Every objective trains the generator to make the discriminator's output move toward the "real" (1) class – they differ only in how that pressure is shaped (saturating vs. non-saturating vs. quadratic). More...

#include <egan_mutation.hpp>

Public Member Functions

 MutationLoss (DeviceBackend *backend)
 
float Forward (MutationObjective objective, const Tensor &logits)
 Computes the chosen objective's scalar value against logits.
 
Tensor Backward () const
 Gradient w.r.t. the logits passed to the most recent Forward() call.
 

Detailed Description

Computes one of E-GAN's three named mutation objectives against a discriminator's own raw logit output, and its gradient w.r.t. those logits. Every objective trains the generator to make the discriminator's output move toward the "real" (1) class – they differ only in how that pressure is shaped (saturating vs. non-saturating vs. quadratic).

Constructor & Destructor Documentation

◆ MutationLoss()

pulsatrix::MutationLoss::MutationLoss ( DeviceBackend *  backend)
inlineexplicit

Member Function Documentation

◆ Backward()

Tensor pulsatrix::MutationLoss::Backward ( ) const
inline

Gradient w.r.t. the logits passed to the most recent Forward() call.

Exceptions
std::logic_errorif Forward() has never been called (delegated from the underlying loss's own backward()).

◆ Forward()

float pulsatrix::MutationLoss::Forward ( MutationObjective  objective,
const Tensor &  logits 
)
inline

Computes the chosen objective's scalar value against logits.


The documentation for this class was generated from the following file: