Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Incorporated latest round of comments
Browse files Browse the repository at this point in the history
  • Loading branch information
connorgoggins committed Mar 3, 2020
1 parent eb09cf1 commit 999328a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/operator/rnn-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct RNNParam : public dmlc::Parameter<RNNParam> {
}
};

inline int GetRnnParamSize(int num_layer,
inline index_t GetRnnParamSize(int num_layer,
index_t input_size,
int state_size,
int direction,
Expand Down
6 changes: 3 additions & 3 deletions src/operator/rnn_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void LstmForwardTraining(DType* ws,
const int total_layers = D * L;
Tensor<cpu, 3, DType> hx(hx_ptr, Shape3(total_layers, N, H));
Tensor<cpu, 3, DType> cx(cx_ptr, Shape3(total_layers, N, H));
const int b_size = 2 * H * 4;
const index_t b_size = 2 * H * 4;
const index_t r_size = D * T * N * H * 6;
const index_t y_offset = T * N * H * 5;
const index_t cell_size = N * H;
Expand Down Expand Up @@ -298,7 +298,7 @@ void LstmForwardInference(DType* ws,
const int total_layers = D * L;
Tensor<cpu, 3, DType> hx(hx_ptr, Shape3(total_layers, N, P ? P : H));
Tensor<cpu, 3, DType> cx(cx_ptr, Shape3(total_layers, N, H));
const int b_size = 2 * H * 4;
const index_t b_size = 2 * H * 4;
const index_t cell_size = N * H;
const index_t projection_size = (P ? P : H) * N;
DType* y_tmp_ptr = ws + (T + 1) * cell_size * 4 + cell_size * 2;
Expand Down Expand Up @@ -553,7 +553,7 @@ void LstmBackward(DType* ws,
Tensor<cpu, 3, DType> cx(cx_ptr, Shape3(total_layers, N, H));
Tensor<cpu, 3, DType> dhx(dhx_ptr, Shape3(total_layers, N, H));
Tensor<cpu, 3, DType> dcx(dcx_ptr, Shape3(total_layers, N, H));
const int b_size = 2 * H * 4;
const index_t b_size = 2 * H * 4;
const index_t r_size = D * T * N * H * 6;
const index_t y_offset = T * N * H * 5;
const index_t w_size1 = (I + H) * H * 4; // first layer
Expand Down

0 comments on commit 999328a

Please sign in to comment.