MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / OutputSlice

Method OutputSlice

tensorflow/core/kernels/rnn/lstm_ops.cc:755–764  ·  view source on GitHub ↗

Slice through an output tensor. This may copy unaligned slices, and schedule copying back on destruction.

Source from the content-addressed store, hash-verified

753 // Slice through an output tensor. This may copy unaligned slices, and
754 // schedule copying back on destruction.
755 Tensor OutputSlice(Tensor* t, int pos, const string& name) {
756 Tensor res = UnalignedSlice(*t, pos);
757 if (res.IsAligned()) {
758 return res;
759 } else {
760 Tensor aligned = AlignTensor(res, name);
761 copy_out_.emplace_back(res, aligned);
762 return aligned;
763 }
764 }
765
766 void FinishTimeStep() {
767 for (const auto& p : copy_out_) {

Callers 2

ComputeMethod · 0.80
ComputeMethod · 0.80

Calls 2

IsAlignedMethod · 0.80
emplace_backMethod · 0.45

Tested by

no test coverage detected