本文整理汇总了Python中neuralnet.NeuralNet.scg方法的典型用法代码示例。如果您正苦于以下问题:Python NeuralNet.scg方法的具体用法?Python NeuralNet.scg怎么用?Python NeuralNet.scg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neuralnet.NeuralNet
的用法示例。
在下文中一共展示了NeuralNet.scg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: NeuralNet
# 需要导入模块: from neuralnet import NeuralNet [as 别名]
# 或者: from neuralnet.NeuralNet import scg [as 别名]
"save_trained_network" : False, # Whether to write the trained weights to disk
"input_layer_dropout" : 0.0, # dropout fraction of the input layer
"hidden_layer_dropout" : 0.0, # dropout fraction in all hidden layers
}
# initialize the neural network
network = NeuralNet( settings )
# load a stored network configuration
# network = NeuralNet.load_from_file( "trained_configuration.pkl" )
# Train the network using Scaled Conjugate Gradient
network.scg(
training_one,
ERROR_LIMIT = 1e-4
)
# Train the network using backpropagation
#network.backpropagation(
# training_one, # specify the training set
# ERROR_LIMIT = 1e-3, # define an acceptable error limit
# #max_iterations = 100, # continues until the error limit is reach if this argument is skipped
#
# # optional parameters
# learning_rate = 0.03, # learning rate
# momentum_factor = 0.45, # momentum
# )
# Train the network using resilient backpropagation
#network.resilient_backpropagation(