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

Function GpuRNNGetParamCopy

src/model/operation/rnn.cc:507–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507Tensor GpuRNNGetParamCopy(int linLayerID, int pseudoLayer, Tensor &weights,
508 bool is_bias, CudnnRNNHandle &h) {
509 size_t offset, size;
510 std::tie(offset, size) =
511 h.weights_mapping[std::make_tuple(linLayerID, pseudoLayer, is_bias)];
512 Tensor paramCopy(
513 Shape{
514 size,
515 },
516 weights.device());
517 CopyDataToFrom(&paramCopy, weights, size, 0, offset);
518 return paramCopy;
519}
520
521/*
522vector<Tensor> GpuRNNForwardTrainingEx();

Callers

nothing calls this directly

Calls 3

make_tupleFunction · 0.85
CopyDataToFromFunction · 0.85
deviceMethod · 0.80

Tested by

no test coverage detected