paddlespeech.t2s.training.reporter module

class paddlespeech.t2s.training.reporter.DictSummary[source]

Bases: object

Online summarization of a sequence of dictionaries.

DictSummary computes the statistics of a given set of scalars online. It only computes the statistics for scalar values and variables of scalar values in the dictionaries.

Methods

add(d)

Adds a dictionary of scalars.

compute_mean()

Creates a dictionary of mean values.

make_statistics()

Creates a dictionary of statistics.

add(d)[source]

Adds a dictionary of scalars.

Args:
d (dict): Dictionary of scalars to accumulate. Only elements of

scalars, zero-dimensional arrays, and variables of zero-dimensional arrays are accumulated. When the value is a tuple, the second element is interpreted as a weight.

compute_mean()[source]

Creates a dictionary of mean values.

It returns a single dictionary that holds a mean value for each entry added to the summary.

Returns:

dict: Dictionary of mean values.

make_statistics()[source]

Creates a dictionary of statistics.

It returns a single dictionary that holds mean and standard deviation values for every entry added to the summary. For an entry of name 'key', these values are added to the dictionary by names 'key' and 'key.std', respectively.

Returns:

dict: Dictionary of statistics of all entries.

class paddlespeech.t2s.training.reporter.Summary[source]

Bases: object

Online summarization of a sequence of scalars. Summary computes the statistics of given scalars online.

Methods

add(value[, weight])

Adds a scalar value.

compute_mean()

Computes the mean.

make_statistics()

Computes and returns the mean and standard deviation values.

add(value, weight=1)[source]

Adds a scalar value.

Args:
value: Scalar value to accumulate. It is either a NumPy scalar or

a zero-dimensional array (on CPU or GPU).

weight: An optional weight for the value. It is a NumPy scalar or

a zero-dimensional array (on CPU or GPU). Default is 1 (integer).

compute_mean()[source]

Computes the mean.

make_statistics()[source]

Computes and returns the mean and standard deviation values.

Returns:

tuple: Mean and standard deviation values.

paddlespeech.t2s.training.reporter.get_observations()[source]
paddlespeech.t2s.training.reporter.report(name, value)[source]
paddlespeech.t2s.training.reporter.scope(observations)[source]