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

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

返回值

成功时返回训练数据 资源,发生错误返回 false

注释

注意:

This function is only available if the fann extension has been build against libfann >= 2.2.

参见

添加备注

用户贡献的备注 1 note

up
3
geekgirl dot joy at gmail dot com
6 years ago
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
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant