SplitExampleStats Struct Reference

This struct exists only for diagnostic purposes. More...

#include <nnet-example-functions.h>

Collaboration diagram for SplitExampleStats:

Public Member Functions

 SplitExampleStats ()
 
void Print ()
 

Public Attributes

int32 num_lattices
 
int32 longest_lattice
 
int32 num_segments
 
int32 num_kept_segments
 
int64 num_frames_orig
 
int64 num_frames_must_keep
 
int64 num_frames_kept_after_split
 
int32 longest_segment_after_split
 
int64 num_frames_kept_after_excise
 
int32 longest_segment_after_excise
 

Detailed Description

This struct exists only for diagnostic purposes.

Note: the stats assume that you call SplitDiscriminative and ExciseDiscriminativeExample in the same program, and the info printed out will be wrong if this is not the case... this isn't ideal but it was more convenient.

Definition at line 121 of file nnet-example-functions.h.

Constructor & Destructor Documentation

◆ SplitExampleStats()

Member Function Documentation

◆ Print()

void Print ( )

Definition at line 573 of file nnet-example-functions.cc.

References KALDI_LOG.

Referenced by main().

573  {
574  KALDI_LOG << "Split " << num_lattices << " lattices. Stats:";
575  double kept_segs_per_lat = num_kept_segments * 1.0 / num_lattices,
576  segs_per_lat = num_segments * 1.0 / num_lattices;
577 
578  KALDI_LOG << "Made on average " << segs_per_lat << " segments per lattice, "
579  << "of which " << kept_segs_per_lat << " were kept.";
580 
581  double percent_needed = num_frames_must_keep * 100.0 / num_frames_orig,
582  percent_after_split = num_frames_kept_after_split * 100.0 / num_frames_orig,
583  percent_after_excise = num_frames_kept_after_excise * 100.0 / num_frames_orig;
584 
585  KALDI_LOG << "Needed to keep " << percent_needed << "% of frames, after split "
586  << "kept " << percent_after_split << "%, after excising frames kept "
587  << percent_after_excise << "%.";
588 
589  KALDI_LOG << "Longest lattice had " << longest_lattice
590  << " frames, longest segment after splitting had "
592  << " frames, longest segment after excising had "
594 }
#define KALDI_LOG
Definition: kaldi-error.h:153

Member Data Documentation

◆ longest_lattice

int32 longest_lattice

Definition at line 123 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().

◆ longest_segment_after_excise

int32 longest_segment_after_excise

Definition at line 131 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoExcise().

◆ longest_segment_after_split

int32 longest_segment_after_split

Definition at line 129 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().

◆ num_frames_kept_after_excise

int64 num_frames_kept_after_excise

Definition at line 130 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoExcise().

◆ num_frames_kept_after_split

int64 num_frames_kept_after_split

Definition at line 128 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().

◆ num_frames_must_keep

int64 num_frames_must_keep

Definition at line 127 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().

◆ num_frames_orig

int64 num_frames_orig

Definition at line 126 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().

◆ num_kept_segments

int32 num_kept_segments

Definition at line 125 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().

◆ num_lattices

int32 num_lattices

Definition at line 122 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().

◆ num_segments

int32 num_segments

Definition at line 124 of file nnet-example-functions.h.

Referenced by DiscriminativeExampleSplitter::DoSplit().


The documentation for this struct was generated from the following files: