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

Method Reset

tensorflow/core/util/ctc/ctc_beam_search.h:385–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383
384template <typename T, typename CTCBeamState, typename CTCBeamComparer>
385void CTCBeamSearchDecoder<T, CTCBeamState, CTCBeamComparer>::Reset() {
386 leaves_.Reset();
387
388 // This beam root, and all of its children, will be in memory until
389 // the next reset.
390 beam_root_.reset(new BeamRoot(nullptr, -1));
391 beam_root_->RootEntry()->newp.total = T(0.0); // ln(1)
392 beam_root_->RootEntry()->newp.blank = T(0.0); // ln(1)
393
394 // Add the root as the initial leaf.
395 leaves_.push(beam_root_->RootEntry());
396
397 // Call initialize state on the root object.
398 beam_scorer_->InitializeState(&beam_root_->RootEntry()->state);
399}
400
401template <typename T, typename CTCBeamState, typename CTCBeamComparer>
402Status CTCBeamSearchDecoder<T, CTCBeamState, CTCBeamComparer>::TopPaths(

Callers 2

DecodeMethod · 0.45
StepMethod · 0.45

Calls 4

resetMethod · 0.45
RootEntryMethod · 0.45
pushMethod · 0.45
InitializeStateMethod · 0.45

Tested by

no test coverage detected