本文整理汇总了Python中neuralnet.NeuralNet.predict方法的典型用法代码示例。如果您正苦于以下问题:Python NeuralNet.predict方法的具体用法?Python NeuralNet.predict怎么用?Python NeuralNet.predict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neuralnet.NeuralNet
的用法示例。
在下文中一共展示了NeuralNet.predict方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: resilient_backpropagation
# 需要导入模块: from neuralnet import NeuralNet [as 别名]
# 或者: from neuralnet.NeuralNet import predict [as 别名]
# Train the network using resilient backpropagation
resilient_backpropagation(
network,
training_data, # specify the training set
test_data, # specify the test set
cost_function, # specify the cost function to calculate error
ERROR_LIMIT = 1e-3, # define an acceptable error limit
#max_iterations = (), # continues until the error limit is reach if this argument is skipped
# optional parameters
weight_step_max = 50.,
weight_step_min = 0.,
start_step = 0.5,
learn_max = 1.2,
learn_min = 0.5,
save_trained_network = False # Whether to write the trained weights to disk
)
# Print a network test
print_test( network, training_data, cost_function )
"""
Prediction Example
"""
prediction_set = [ Instance([0,1]), Instance([1,0]) ]
prediction_set = preprocessor( prediction_set )
print network.predict( prediction_set ) # produce the output signal