首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >FANN错误1:无法打开文件

FANN错误1:无法打开文件
EN

Stack Overflow用户
提问于 2011-03-25 19:34:14
回答 1查看 1.2K关注 0票数 0

我正在尝试这个代码,但是我得到了错误,我不能解决这个问题!

有谁知道吗?

代码语言:javascript
复制
#include<iostream>
using namespace std;
#include <cv.h>
#include <highgui.h>
#include <fann.h>
#include <fann_cpp.h>
#include <floatfann.h>
int main()
{

const float connection_rate = 1;
const float learning_rate = 0.7;
const unsigned int num_layers = 3;
const unsigned int num_input = 2;
const unsigned int num_neurons_hidden = 4;
const unsigned int num_output = 1;
const float desired_error = 0.0001;
const unsigned int max_epochs = 500000;
const unsigned int epochs_between_reports = 1000;
FANN::neural_net ann;
ann.create_standard(num_layers,num_input, num_neurons_hidden, num_output,connection_rate,learning_rate);
ann.train_on_file("C:\\xor.data", max_epochs,epochs_between_reports, desired_error);
ann.save("C:\\xor_float.net");
ann.destroy();
return 0;
}

xor.data:

4 2 1

0%0

0 1

1

1%0

1

1 1

错误是: FANN错误1:无法打开配置文件"C:\xor.data“进行读取。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2011-03-25 19:36:29

这可能意味着您需要在C驱动器中有一个名为xor.data的文件,该文件将包含配置信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5431864

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档