src/lstm/lstm.cpp
void LSTM::Update(float learning_rate, float momentum, float adam_beta, int num_samples) {
#if DEBUG_DETAIL > 3
  PrintW();
#endif
  for (int w = 0; w < WT_COUNT; ++w) {
    if (w == GFS && !Is2D()) {
      continue;
    }
    gate_weights_[w].Update(learning_rate, momentum, adam_beta, num_samples);
  }
  if (softmax_ != nullptr) {
    softmax_->Update(learning_rate, momentum, adam_beta, num_samples);
  }
#if DEBUG_DETAIL > 3
  PrintDW();
#endif
}
// Updates the weights using the given learning rate, momentum and adam_beta.
// num_samples is used in the adam computation iff use_adam_ is true.
Updates the weights using the given learning rate, momentum and adam_beta.
num_samples is used in the adam computation iff use_adam_ is true.
Updates the weights using the given learning rate momentum and adam_beta . num_samples is used in the adam computation iff use_adam_ is true .
void LSTM::Update(float learning_rate, float momentum, float adam_beta, int num_samples) {
#if DEBUG_DETAIL > 3
  PrintW();
#endif
  for (int w = 0; w < WT_COUNT; ++w) {
    if (w == GFS && !Is2D()) {
      continue;
    }
    gate_weights_[w].Update(learning_rate, momentum, adam_beta, num_samples);
  }
  if (softmax_ != nullptr) {
    softmax_->Update(learning_rate, momentum, adam_beta, num_samples);
  }
#if DEBUG_DETAIL > 3
  PrintDW();
#endif
}
void LSTM :: Update ( float learning_rate , float momentum , float adam_beta , int num_samples ) { #if DEBUG_DETAIL > 3 PrintW ( ) ; #endif for ( int w = 0 ; w < WT_COUNT ; ++ w ) { if ( w == GFS && ! Is2D ( ) ) { continue ; } gate_weights_ [ w ] . Update ( learning_rate , momentum , adam_beta , num_samples ) ; } if ( softmax_ != nullptr ) { softmax_ -> Update ( learning_rate , momentum , adam_beta , num_samples ) ; } #if DEBUG_DETAIL > 3 PrintDW ( ) ; #endif }
Updates the weights using the given learning rate, momentum and adam_beta.
Updates the weights using the given learning rate momentum and adam_beta .