php教程

fann_create_train

(PECL fann >= 1.0.0)

fann_create_train创建一个空的训练数据结构。

说明

fann_create_train ( int $num_data , int $num_input , int $num_output ) : resource

创建一个空的训练数据结构。

参数

num_data

训练数据的数量。

num_input

每个训练数据集输入的数量。

num_output

每个训练数据集输出的数量。

返回值

Returns a train data resource on success, or FALSE on error.

参见

User Contributed Notes

geekgirl dot joy at gmail dot com 01-Nov-2018 07:13
The result of fann_create_train() is a "blank" or "empty" training data resource which can be saved to a file using fann_save_train().

<?php

$num_data
= 4;
$num_input = 2;
$num_output = 1;

// Create an empty 'template' training resource in memory
$empty_training_resource = fann_create_train ($num_data , $num_input , $num_output);

// Save template.data
fann_save_train($empty_training_resource, 'template.data');

?>

File Saved (template.data):
4 2 1
0 0
0
0 0
0
0 0
0
0 0
0

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788