SpecAugmentTimeMaskComponent Class Reference

SpecAugmentTimeMaskComponent implements the time part of SpecAugment. More...

#include <nnet-general-component.h>

Inheritance diagram for SpecAugmentTimeMaskComponent:
Collaboration diagram for SpecAugmentTimeMaskComponent:

Public Member Functions

virtual int32 InputDim () const
 Returns input-dimension of this component. More...
 
virtual int32 OutputDim () const
 Returns output-dimension of this component. More...
 
virtual std::string Info () const
 Returns some text-form information about this component, for diagnostics. More...
 
virtual void InitFromConfig (ConfigLine *cfl)
 Initialize, from a ConfigLine object. More...
 
 SpecAugmentTimeMaskComponent ()
 
 SpecAugmentTimeMaskComponent (const SpecAugmentTimeMaskComponent &other)
 
virtual std::string Type () const
 Returns a string such as "SigmoidComponent", describing the type of the object. More...
 
virtual int32 Properties () const
 Return bitmask of the component's properties. More...
 
virtual void * Propagate (const ComponentPrecomputedIndexes *indexes, const CuMatrixBase< BaseFloat > &in, CuMatrixBase< BaseFloat > *out) const
 Propagate function. More...
 
virtual void Backprop (const std::string &debug_info, const ComponentPrecomputedIndexes *indexes, const CuMatrixBase< BaseFloat > &, const CuMatrixBase< BaseFloat > &, const CuMatrixBase< BaseFloat > &out_deriv, void *memo, Component *to_update, CuMatrixBase< BaseFloat > *in_deriv) const
 Backprop function; depending on which of the arguments 'to_update' and 'in_deriv' are non-NULL, this can compute input-data derivatives and/or perform model update. More...
 
virtual void DeleteMemo (void *memo) const
 This virtual function only needs to be overwritten by Components that return a non-NULL memo from their Propagate() function. More...
 
virtual ComponentPrecomputedIndexesPrecomputeIndexes (const MiscComputationInfo &misc_info, const std::vector< Index > &input_indexes, const std::vector< Index > &output_indexes, bool need_backprop) const
 This function must return NULL for simple Components. More...
 
virtual void Read (std::istream &is, bool binary)
 Read function (used after we know the type of the Component); accepts input that is missing the token that describes the component type, in case it has already been consumed. More...
 
virtual void Write (std::ostream &os, bool binary) const
 Write component to stream. More...
 
virtual ComponentCopy () const
 Copies component (deep copy). More...
 
- Public Member Functions inherited from RandomComponent
void ResetGenerator ()
 
void SetTestMode (bool test_mode)
 
 RandomComponent ()
 
 RandomComponent (const RandomComponent &other)
 
- Public Member Functions inherited from Component
virtual void StoreStats (const CuMatrixBase< BaseFloat > &in_value, const CuMatrixBase< BaseFloat > &out_value, void *memo)
 This function may store stats on average activation values, and for some component types, the average value of the derivative of the nonlinearity. More...
 
virtual void ZeroStats ()
 Components that provide an implementation of StoreStats should also provide an implementation of ZeroStats(), to set those stats to zero. More...
 
virtual void GetInputIndexes (const MiscComputationInfo &misc_info, const Index &output_index, std::vector< Index > *desired_indexes) const
 This function only does something interesting for non-simple Components. More...
 
virtual bool IsComputable (const MiscComputationInfo &misc_info, const Index &output_index, const IndexSet &input_index_set, std::vector< Index > *used_inputs) const
 This function only does something interesting for non-simple Components, and it exists to make it possible to manage optionally-required inputs. More...
 
virtual void ReorderIndexes (std::vector< Index > *input_indexes, std::vector< Index > *output_indexes) const
 This function only does something interesting for non-simple Components. More...
 
virtual void Scale (BaseFloat scale)
 This virtual function when called on – an UpdatableComponent scales the parameters by "scale" when called by an UpdatableComponent. More...
 
virtual void Add (BaseFloat alpha, const Component &other)
 This virtual function when called by – an UpdatableComponent adds the parameters of another updatable component, times some constant, to the current parameters. More...
 
virtual void ConsolidateMemory ()
 This virtual function relates to memory management, and avoiding fragmentation. More...
 
 Component ()
 
virtual ~Component ()
 

Private Member Functions

CuVector< BaseFloat > * GetMemo (const SpecAugmentTimeMaskComponentPrecomputedIndexes &indexes) const
 
const SpecAugmentTimeMaskComponentoperator= (const SpecAugmentTimeMaskComponent &other)
 

Private Attributes

int32 dim_
 
BaseFloat zeroed_proportion_
 
int32 time_mask_max_frames_
 

Additional Inherited Members

- Static Public Member Functions inherited from Component
static ComponentReadNew (std::istream &is, bool binary)
 Read component from stream (works out its type). Dies on error. More...
 
static ComponentNewComponentOfType (const std::string &type)
 Returns a new Component of the given type e.g. More...
 
- Protected Attributes inherited from RandomComponent
CuRand< BaseFloatrandom_generator_
 
bool test_mode_
 

Detailed Description

SpecAugmentTimeMaskComponent implements the time part of SpecAugment.

Instead of zeroing out a single time-region of the input, though, it zeroes out multiple smaller time-regions.

Configuration values accepted on the command line, with defaults:

dim Dimension of the input and output of this component, e.g. 512

zeroed-proportion=0.25 Proportion of the input that is to be zeroed; should be in the range (0, 1).

time-mask-max-frames=10 The maximum time duration of the *zeroed* regions. The non-zeroed regions in between will have maximum duration equal to this times (1-z)/z, where z is zeroed-proportion.

Definition at line 1017 of file nnet-general-component.h.

Constructor & Destructor Documentation

◆ SpecAugmentTimeMaskComponent() [1/2]

◆ SpecAugmentTimeMaskComponent() [2/2]

Definition at line 1902 of file nnet-general-component.cc.

1903  :
1904  dim_(other.dim_),
1905  zeroed_proportion_(other.zeroed_proportion_),
1906  time_mask_max_frames_(other.time_mask_max_frames_) { }

Member Function Documentation

◆ Backprop()

void Backprop ( const std::string &  debug_info,
const ComponentPrecomputedIndexes indexes,
const CuMatrixBase< BaseFloat > &  in_value,
const CuMatrixBase< BaseFloat > &  out_value,
const CuMatrixBase< BaseFloat > &  out_deriv,
void *  memo,
Component to_update,
CuMatrixBase< BaseFloat > *  in_deriv 
) const
virtual

Backprop function; depending on which of the arguments 'to_update' and 'in_deriv' are non-NULL, this can compute input-data derivatives and/or perform model update.

Parameters
[in]debug_infoThe component name, to be printed out in any warning messages.
[in]indexesA pointer to some information output by this class's PrecomputeIndexes function (will be NULL for simple components, i.e. those that don't do things like splicing).
[in]in_valueThe matrix that was given as input to the Propagate function. Will be ignored (and may be empty) if Properties()&kBackpropNeedsInput == 0.
[in]out_valueThe matrix that was output from the Propagate function. Will be ignored (and may be empty) if Properties()&kBackpropNeedsOutput == 0
[in]out_derivThe derivative at the output of this component.
[in]memoThis will normally be NULL, but for component types that set the flag kUsesMemo, this will be the return value of the Propagate() function that corresponds to this Backprop() function. Ownership of any pointers is not transferred to the Backprop function; DeleteMemo() will be called to delete it.
[out]to_updateIf model update is desired, the Component to be updated, else NULL. Does not have to be identical to this. If supplied, you can assume that to_update->Properties() & kUpdatableComponent is nonzero.
[out]in_derivThe derivative at the input of this component, if needed (else NULL). If Properties()&kBackpropInPlace, may be the same matrix as out_deriv. If Properties()&kBackpropAdds, this is added to by the Backprop routine, else it is set. The component code chooses which mode to work in, based on convenience.

Implements Component.

Definition at line 1931 of file nnet-general-component.cc.

References CuMatrixBase< Real >::CopyFromMat(), KALDI_ASSERT, CuMatrixBase< Real >::MulRowsVec(), NVTX_RANGE, kaldi::SameDim(), RandomComponent::test_mode_, and SpecAugmentTimeMaskComponent::zeroed_proportion_.

1939  {
1940  NVTX_RANGE("SpecAugmentTimeMaskComponent::Backprop");
1941  KALDI_ASSERT(in_deriv != NULL && SameDim(*in_deriv, out_deriv));
1942 
1943  // The following will do no work if in_deriv->Data() == out_deriv.Data().
1944  in_deriv->CopyFromMat(out_deriv);
1945 
1946  if (test_mode_ || zeroed_proportion_ == 0.0) {
1947  KALDI_ASSERT(memo == NULL);
1948  return;
1949  }
1950 
1951  const SpecAugmentTimeMaskComponentPrecomputedIndexes *indexes =
1952  dynamic_cast<const SpecAugmentTimeMaskComponentPrecomputedIndexes*>(indexes_in);
1953  KALDI_ASSERT(indexes != NULL && memo != NULL);
1954  CuVector<BaseFloat> *mask = reinterpret_cast<CuVector<BaseFloat>*>(memo);
1955 
1956  in_deriv->MulRowsVec(*mask);
1957 }
bool SameDim(const MatrixBase< Real > &M, const MatrixBase< Real > &N)
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185
#define NVTX_RANGE(name)
Definition: cu-common.h:143

◆ Copy()

Component * Copy ( ) const
virtual

Copies component (deep copy).

Implements Component.

Definition at line 1989 of file nnet-general-component.cc.

References SpecAugmentTimeMaskComponent::SpecAugmentTimeMaskComponent().

1989  {
1990  return new SpecAugmentTimeMaskComponent(*this);
1991 }

◆ DeleteMemo()

virtual void DeleteMemo ( void *  memo) const
inlinevirtual

This virtual function only needs to be overwritten by Components that return a non-NULL memo from their Propagate() function.

It's called by NnetComputer in cases where Propagate returns a memo but there will be no backprop to consume it.

Reimplemented from Component.

Definition at line 1048 of file nnet-general-component.h.

References DistributeComponent::Copy(), DistributeComponent::PrecomputeIndexes(), DistributeComponent::Read(), and DistributeComponent::Write().

1048  {
1049  delete static_cast<CuVector<BaseFloat>*>(memo);
1050  }

◆ GetMemo()

CuVector< BaseFloat > * GetMemo ( const SpecAugmentTimeMaskComponentPrecomputedIndexes indexes) const
private

Definition at line 2005 of file nnet-general-component.cc.

References SpecAugmentTimeMaskComponentPrecomputedIndexes::indexes, KALDI_ASSERT, kaldi::kUndefined, kaldi::RandInt(), SpecAugmentTimeMaskComponent::time_mask_max_frames_, SpecAugmentTimeMaskComponentPrecomputedIndexes::tot_size, kaldi::WithProb(), and SpecAugmentTimeMaskComponent::zeroed_proportion_.

Referenced by SpecAugmentTimeMaskComponent::Propagate().

2006  {
2007 
2008  const std::vector<std::vector<int32> > &indexes = indexes_in.indexes;
2009  int32 num_sequences = indexes.size();
2011  int32 time_mask_max_frames = time_mask_max_frames_,
2012  non_time_mask_max_frames = time_mask_max_frames * (1-z) / z;
2013  KALDI_ASSERT(time_mask_max_frames > 0 &&
2014  non_time_mask_max_frames > 0);
2015  Vector<BaseFloat> mask(indexes_in.tot_size, kUndefined);
2016 
2017  for (int32 s = 0; s < num_sequences; s++) {
2018  // this_row_indexes gives us, for a particular sequence, the ordered list of
2019  // row-indexes where we can find the successive 't' values of this sequence.
2020  const std::vector<int32> this_row_indexes = indexes[s];
2021  int32 seq_length = this_row_indexes.size();
2022  KALDI_ASSERT(seq_length > 0);
2023 
2024  int32 t = 0;
2025  while (t < seq_length) {
2026  // add a non-zeroed, then a zeroed, segment, repeatedly until we have
2027  // filled the sequence. The first time we choose randomly whether to add
2028  // a zeroed or a non-zeroed segment.
2029  if (t > 0 || WithProb(z)) {
2030  int32 nonzeroed_length = RandInt(1, non_time_mask_max_frames);
2031  for (; t < seq_length && nonzeroed_length > 0; t++, nonzeroed_length--)
2032  mask(this_row_indexes[t]) = 1.0;
2033  }
2034  int32 zeroed_length = RandInt(1, time_mask_max_frames);
2035  for (; t < seq_length && zeroed_length > 0; t++, zeroed_length--)
2036  mask(this_row_indexes[t]) = 0.0;
2037  }
2038  }
2039  return new CuVector<BaseFloat>(mask);
2040 }
bool WithProb(BaseFloat prob, struct RandomState *state)
Definition: kaldi-math.cc:72
kaldi::int32 int32
float BaseFloat
Definition: kaldi-types.h:29
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185
int32 RandInt(int32 min_val, int32 max_val, struct RandomState *state)
Definition: kaldi-math.cc:95

◆ Info()

std::string Info ( ) const
virtual

Returns some text-form information about this component, for diagnostics.

Starts with the type of the component. E.g. "SigmoidComponent dim=900", although most components will have much more info.

Reimplemented from Component.

Definition at line 1889 of file nnet-general-component.cc.

References GeneralDropoutComponent::dim_, and GeneralDropoutComponent::Type().

1889  {
1890  std::ostringstream stream;
1891  stream << Type()
1892  << ", dim=" << dim_
1893  << ", zeroed-proportion=" << zeroed_proportion_
1894  << ", time-mask-max-frames=" << time_mask_max_frames_;
1895  return stream.str();
1896 }
virtual std::string Type() const
Returns a string such as "SigmoidComponent", describing the type of the object.

◆ InitFromConfig()

void InitFromConfig ( ConfigLine cfl)
virtual

Initialize, from a ConfigLine object.

Parameters
[in]cflA ConfigLine containing any parameters that are needed for initialization. For example: "dim=100 param-stddev=0.1"

Implements Component.

Definition at line 1993 of file nnet-general-component.cc.

References SpecAugmentTimeMaskComponent::dim_, ConfigLine::GetValue(), KALDI_ASSERT, SpecAugmentTimeMaskComponent::time_mask_max_frames_, and SpecAugmentTimeMaskComponent::zeroed_proportion_.

1993  {
1994  dim_ = 0;
1995  bool ok = cfl->GetValue("dim", &dim_);
1996  KALDI_ASSERT(ok && dim_ > 0);
1997  zeroed_proportion_ = 0.25;
1998  cfl->GetValue("zeroed-proportion", &zeroed_proportion_);
1999  time_mask_max_frames_ = 10;
2000  cfl->GetValue("time-mask-max-frames", &time_mask_max_frames_);
2002 }
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185

◆ InputDim()

virtual int32 InputDim ( ) const
inlinevirtual

Returns input-dimension of this component.

Implements Component.

Definition at line 1019 of file nnet-general-component.h.

◆ operator=()

const SpecAugmentTimeMaskComponent& operator= ( const SpecAugmentTimeMaskComponent other)
private

◆ OutputDim()

virtual int32 OutputDim ( ) const
inlinevirtual

Returns output-dimension of this component.

Implements Component.

Definition at line 1021 of file nnet-general-component.h.

References Component::Info(), and DistributeComponent::InitFromConfig().

◆ PrecomputeIndexes()

ComponentPrecomputedIndexes * PrecomputeIndexes ( const MiscComputationInfo misc_info,
const std::vector< Index > &  input_indexes,
const std::vector< Index > &  output_indexes,
bool  need_backprop 
) const
virtual

This function must return NULL for simple Components.

Returns a pointer to a class that may contain some precomputed component-specific and computation-specific indexes to be in used in the Propagate and Backprop functions.

Parameters
[in]misc_infoThis argument is supplied to handle things that the framework can't very easily supply: information like which time indexes are needed for AggregateComponent, which time-indexes are available at the input of a recurrent network, and so on. misc_info may not even ever be used here. We will add members to misc_info as needed.
[in]input_indexesA vector of indexes that explains what time-indexes (and other indexes) each row of the in/in_value/in_deriv matrices given to Propagate and Backprop will mean.
[in]output_indexesA vector of indexes that explains what time-indexes (and other indexes) each row of the out/out_value/out_deriv matrices given to Propagate and Backprop will mean.
[in]need_backpropTrue if we might need to do backprop with this component, so that if any different indexes are needed for backprop then those should be computed too.
Returns
Returns a child-class of class ComponentPrecomputedIndexes, or NULL if this component for does not need to precompute any indexes (e.g. if it is a simple component and does not care about indexes).

Reimplemented from Component.

Definition at line 2042 of file nnet-general-component.cc.

References rnnlm::i, SpecAugmentTimeMaskComponentPrecomputedIndexes::indexes, KALDI_ASSERT, rnnlm::n, and SpecAugmentTimeMaskComponentPrecomputedIndexes::tot_size.

2046  {
2047  KALDI_ASSERT(input_indexes == output_indexes);
2048 
2049  SpecAugmentTimeMaskComponentPrecomputedIndexes *ans = new
2050  SpecAugmentTimeMaskComponentPrecomputedIndexes;
2051  int32 size = input_indexes.size();
2052  KALDI_ASSERT(size != 0);
2053  // 'sort_indexes' will contain the n and t values and then
2054  // the index into input_indexes. When we sort these, it will
2055  // sort first on the n value and then on the t, which will allow us
2056  // to create ans->indexes.
2057  std::vector<std::tuple<int32, int32, int32> > sort_indexes(size);
2058 
2059  std::unordered_set<int32> all_n_values; // just for determining how many
2060  // there are.
2061  for (int32 i = 0; i < size; i++) {
2062  int32 n = input_indexes[i].n;
2063  all_n_values.insert(n);
2064  std::get<0>(sort_indexes[i]) = n;
2065  std::get<1>(sort_indexes[i]) = input_indexes[i].t;
2066  std::get<2>(sort_indexes[i]) = i;
2067  }
2068  std::sort(sort_indexes.begin(), sort_indexes.end());
2069 
2070  // the stuff with n_idx is because we don't assume the
2071  // n values start from zero and are consecutive.
2072  int32 num_n_values = all_n_values.size(),
2073  n_idx = 0,
2074  cur_n_value = std::get<0>(sort_indexes[0]);
2075  ans->indexes.resize(num_n_values);
2076  for (int32 i = 0; i < size; i++) {
2077  std::tuple<int32, int32, int32> &tp(sort_indexes[i]);
2078  int32 n = std::get<0>(tp),
2079  row_index = std::get<2>(tp);
2080  KALDI_ASSERT(n >= cur_n_value);
2081  if (n > cur_n_value) {
2082  n_idx++;
2083  KALDI_ASSERT(n_idx < num_n_values);
2084  cur_n_value = n;
2085  }
2086  ans->indexes[n_idx].push_back(row_index);
2087  }
2088  n_idx++;
2089  KALDI_ASSERT(n_idx == num_n_values);
2090  ans->tot_size = size;
2091  return ans;
2092 }
kaldi::int32 int32
struct rnnlm::@11::@12 n
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185

◆ Propagate()

void * Propagate ( const ComponentPrecomputedIndexes indexes,
const CuMatrixBase< BaseFloat > &  in,
CuMatrixBase< BaseFloat > *  out 
) const
virtual

Propagate function.

Parameters
[in]indexesA pointer to some information output by this class's PrecomputeIndexes function (will be NULL for simple components, i.e. those that don't do things like splicing).
[in]inThe input to this component. Num-columns == InputDim().
[out]outThe output of this component. Num-columns == OutputDim(). Note: output of this component will be added to the initial value of "out" if Properties()&kPropagateAdds != 0; otherwise the output will be set and the initial value ignored. Each Component chooses whether it is more convenient implementation-wise to add or set, and the calling code has to deal with it.
Returns
Normally returns NULL, but may return a non-NULL value for components which have the flag kUsesMemo set. This value will be passed into the corresponding Backprop routine.

Implements Component.

Definition at line 1908 of file nnet-general-component.cc.

References CuMatrixBase< Real >::CopyFromMat(), SpecAugmentTimeMaskComponent::GetMemo(), KALDI_ASSERT, CuMatrixBase< Real >::MulRowsVec(), kaldi::SameDim(), RandomComponent::test_mode_, and SpecAugmentTimeMaskComponent::zeroed_proportion_.

1911  {
1912 
1913  KALDI_ASSERT(SameDim(in, *out));
1914 
1915  // The following will do nothing if 'out' and 'in' refer to the same data.
1916  out->CopyFromMat(in);
1917 
1918  if (test_mode_ ||
1919  zeroed_proportion_ == 0.0)
1920  return NULL;
1921 
1922  const SpecAugmentTimeMaskComponentPrecomputedIndexes *indexes =
1923  dynamic_cast<const SpecAugmentTimeMaskComponentPrecomputedIndexes*>(indexes_in);
1924  KALDI_ASSERT(indexes != NULL);
1925 
1926  CuVector<BaseFloat> *mask = GetMemo(*indexes);
1927  out->MulRowsVec(*mask);
1928  return mask;
1929 }
CuVector< BaseFloat > * GetMemo(const SpecAugmentTimeMaskComponentPrecomputedIndexes &indexes) const
bool SameDim(const MatrixBase< Real > &M, const MatrixBase< Real > &N)
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185

◆ Properties()

virtual int32 Properties ( ) const
inlinevirtual

◆ Read()

void Read ( std::istream &  is,
bool  binary 
)
virtual

Read function (used after we know the type of the Component); accepts input that is missing the token that describes the component type, in case it has already been consumed.

Implements Component.

Definition at line 1959 of file nnet-general-component.cc.

References SpecAugmentTimeMaskComponent::dim_, kaldi::ExpectOneOrTwoTokens(), kaldi::nnet3::ExpectToken(), kaldi::PeekToken(), kaldi::ReadBasicType(), RandomComponent::test_mode_, SpecAugmentTimeMaskComponent::time_mask_max_frames_, and SpecAugmentTimeMaskComponent::zeroed_proportion_.

1959  {
1960  ExpectOneOrTwoTokens(is, binary, "<SpecAugmentTimeMaskComponent>", "<Dim>");
1961  ReadBasicType(is, binary, &dim_);
1962  ExpectToken(is, binary, "<ZeroedProportion>");
1963  ReadBasicType(is, binary, &zeroed_proportion_);
1964  ExpectToken(is, binary, "<TimeMaskMaxFrames>");
1965  ReadBasicType(is, binary, &time_mask_max_frames_);
1966  if (PeekToken(is, binary) == 'T') {
1967  ExpectToken(is, binary, "<TestMode>");
1968  test_mode_ = true;
1969  } else {
1970  test_mode_ = false;
1971  }
1972  ExpectToken(is, binary, "</SpecAugmentTimeMaskComponent>");
1973 }
void ReadBasicType(std::istream &is, bool binary, T *t)
ReadBasicType is the name of the read function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:55
void ExpectOneOrTwoTokens(std::istream &is, bool binary, const std::string &token1, const std::string &token2)
This function is like ExpectToken but for two tokens, and it will either accept token1 and then token...
Definition: text-utils.cc:536
static void ExpectToken(const std::string &token, const std::string &what_we_are_parsing, const std::string **next_token)
int PeekToken(std::istream &is, bool binary)
PeekToken will return the first character of the next token, or -1 if end of file.
Definition: io-funcs.cc:170

◆ Type()

virtual std::string Type ( ) const
inlinevirtual

Returns a string such as "SigmoidComponent", describing the type of the object.

Implements Component.

Definition at line 1031 of file nnet-general-component.h.

1031 { return "SpecAugmentTimeMaskComponent"; }

◆ Write()

void Write ( std::ostream &  os,
bool  binary 
) const
virtual

Write component to stream.

Implements Component.

Definition at line 1976 of file nnet-general-component.cc.

References SpecAugmentTimeMaskComponent::dim_, RandomComponent::test_mode_, SpecAugmentTimeMaskComponent::time_mask_max_frames_, kaldi::WriteBasicType(), kaldi::WriteToken(), and SpecAugmentTimeMaskComponent::zeroed_proportion_.

1976  {
1977  WriteToken(os, binary, "<SpecAugmentTimeMaskComponent>");
1978  WriteToken(os, binary, "<Dim>");
1979  WriteBasicType(os, binary, dim_);
1980  WriteToken(os, binary, "<ZeroedProportion>");
1981  WriteBasicType(os, binary, zeroed_proportion_);
1982  WriteToken(os, binary, "<TimeMaskMaxFrames>");
1984  if (test_mode_)
1985  WriteToken(os, binary, "<TestMode>");
1986  WriteToken(os, binary, "</SpecAugmentTimeMaskComponent>");
1987 }
void WriteToken(std::ostream &os, bool binary, const char *token)
The WriteToken functions are for writing nonempty sequences of non-space characters.
Definition: io-funcs.cc:134
void WriteBasicType(std::ostream &os, bool binary, T t)
WriteBasicType is the name of the write function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:34

Member Data Documentation

◆ dim_

◆ time_mask_max_frames_

◆ zeroed_proportion_


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