本文整理匯總了Python中mlp.MLP.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python MLP.__init__方法的具體用法?Python MLP.__init__怎麽用?Python MLP.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mlp.MLP
的用法示例。
在下文中一共展示了MLP.__init__方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from mlp import MLP [as 別名]
# 或者: from mlp.MLP import __init__ [as 別名]
def __init__(self, n_ins, hidden_layers_sizes, n_outs,
numpy_rng=None, theano_rng=None):
MLP.__init__(self, n_ins, hidden_layers_sizes, n_outs,
numpy_rng, theano_rng)
# labels (used for minibatch sgd during RL)
self.y = T.vector('y')
# actions (for each label, there is a corresponding
# number here representing the ouput node value that
# it should be compared to during SGD
self.a = T.ivector('a')
# The training error
self.training_cost = T.sum(T.sqr(self.outLayer.output[T.arange(self.a.shape[0]),self.a] - self.y))