示例#1
0
    def params(cls, config=None):
        """
      Set params.
       :param config: contains one optional parameters:sample_rate(int, default=16000).
       :return: An object of class HParams, which is a set of hyperparameters as
                name-value pairs.
       """

        sample_rate = 16000

        hparams = HParams(cls=cls)
        hparams.add_hparam('sample_rate', sample_rate)

        if config is not None:
            hparams.override_from_dict(config)

        return hparams
示例#2
0
    def params(cls, config=None):
        """Set params.

        Args:
            config: contains the following one optional parameter:

            'sample_rate': the sample rate of the signal. (default=16000)

        Note:
            Return an object of class HParams, which is a set of hyperparameters as
            name-value pairs.
        """

        sample_rate = 16000

        hparams = HParams(cls=cls)
        hparams.add_hparam('sample_rate', sample_rate)

        if config is not None:
            hparams.override_from_dict(config)

        return hparams