GClasses
GClasses::GContextGRU Class Reference

Detailed Description

Context class for GRU blocks.

#include <GBlock.h>

Inheritance diagram for GClasses::GContextGRU:
GClasses::GContextRecurrentInstance GClasses::GContext

Public Member Functions

 GContextGRU (GRand &rand, GBlockGRU &block)
 
virtual void backProp (GContextRecurrentInstance *pPrev, const GVec &outBlame, GVec &inBlame) override
 
virtual void clearBlame () override
 
virtual void forwardProp (GContextRecurrentInstance *pPrev, const GVec &input, GVec &output) override
 
virtual void resetState () override
 Resets the state of all recurrent blocks. (This is called whenever a recurrent neural network begins with a new sequence, either for training or testing.) More...
 
virtual void updateGradient (GContextRecurrentInstance *prev, const GVec &input, GVec &gradient) const override
 
- Public Member Functions inherited from GClasses::GContextRecurrentInstance
 GContextRecurrentInstance (GRand &rand)
 
virtual ~GContextRecurrentInstance ()
 
- Public Member Functions inherited from GClasses::GContext
 GContext (GRand &rand)
 
virtual ~GContext ()
 

Public Attributes

GVec m_blameh
 
GVec m_blamer
 
GVec m_blamet
 
GVec m_blamez
 
const GBlockGRUm_block
 
GVec m_buf1
 
GVec m_buf2
 
GVec m_h
 
GVec m_r
 
GVec m_t
 
GVec m_z
 
- Public Attributes inherited from GClasses::GContext
GRandm_rand
 

Constructor & Destructor Documentation

GClasses::GContextGRU::GContextGRU ( GRand rand,
GBlockGRU block 
)

Member Function Documentation

virtual void GClasses::GContextGRU::backProp ( GContextRecurrentInstance pPrev,
const GVec outBlame,
GVec inBlame 
)
overridevirtual
virtual void GClasses::GContextGRU::clearBlame ( )
overridevirtual
virtual void GClasses::GContextGRU::forwardProp ( GContextRecurrentInstance pPrev,
const GVec input,
GVec output 
)
overridevirtual
virtual void GClasses::GContextGRU::resetState ( )
overridevirtual

Resets the state of all recurrent blocks. (This is called whenever a recurrent neural network begins with a new sequence, either for training or testing.)

Implements GClasses::GContext.

virtual void GClasses::GContextGRU::updateGradient ( GContextRecurrentInstance prev,
const GVec input,
GVec gradient 
) const
overridevirtual

Member Data Documentation

GVec GClasses::GContextGRU::m_blameh
GVec GClasses::GContextGRU::m_blamer
GVec GClasses::GContextGRU::m_blamet
GVec GClasses::GContextGRU::m_blamez
const GBlockGRU& GClasses::GContextGRU::m_block
GVec GClasses::GContextGRU::m_buf1
GVec GClasses::GContextGRU::m_buf2
GVec GClasses::GContextGRU::m_h
GVec GClasses::GContextGRU::m_r
GVec GClasses::GContextGRU::m_t
GVec GClasses::GContextGRU::m_z