MCPcopy Create free account
hub / github.com/apache/singa / GpuRNNSetParam

Function GpuRNNSetParam

src/model/operation/rnn.cc:498–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498void GpuRNNSetParam(int linLayerID, int pseudoLayer, Tensor &weights,
499 Tensor &paramValues, bool is_bias, CudnnRNNHandle &h) {
500 size_t offset, size;
501 std::tie(offset, size) =
502 h.weights_mapping[std::make_tuple(linLayerID, pseudoLayer, is_bias)];
503 CHECK_EQ(size, paramValues.size()) << "param size is not expected";
504 CopyDataToFrom(&weights, paramValues, size, offset, 0);
505}
506
507Tensor GpuRNNGetParamCopy(int linLayerID, int pseudoLayer, Tensor &weights,
508 bool is_bias, CudnnRNNHandle &h) {

Callers

nothing calls this directly

Calls 3

make_tupleFunction · 0.85
CopyDataToFromFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected