本文整理汇总了Python中pybrain.supervised.trainers.BackpropTrainer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BackpropTrainer.__init__方法的具体用法?Python BackpropTrainer.__init__怎么用?Python BackpropTrainer.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pybrain.supervised.trainers.BackpropTrainer
的用法示例。
在下文中一共展示了BackpropTrainer.__init__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pybrain.supervised.trainers import BackpropTrainer [as 别名]
# 或者: from pybrain.supervised.trainers.BackpropTrainer import __init__ [as 别名]
def __init__(self, module, etaminus=0.5, etaplus=1.2, deltamin=1.0e-6,
deltamax=5.0, delta0=0.1, **kwargs):
"""Set up training algorithm parameters, and objects associated with
the trainer.
Args:
module: the module whose parameters should be trained.
etaminus: factor by which step width is decreased when overstepping
(0.5)
etaplus: factor by which step width is increased when following
gradient (1.2)
delta: step width for each weight
deltamin: minimum step width (1e-6)
deltamax: maximum step width (5.0)
delta0: initial step width (0.1)
"""
BackpropTrainer.__init__(self, module, **kwargs)
self.epoch = 0
# set descender to RPROP mode and update parameters
self.descent.rprop = True
self.descent.etaplus = etaplus
self.descent.etaminus = etaminus
self.descent.deltamin = deltamin
self.descent.deltamax = deltamax
self.descent.deltanull = delta0
self.descent.init(module.params) # reinitialize, since mode changed