topology_example.cpp

来自「神经网络vc源代码神经网络的VC++代码呀」· C++ 代码 · 共 33 行

CPP
33
字号
/*
    nn-utility (Provides neural networking utilities for c++ programmers)
    Copyright (C) 2003 Panayiotis Thomakos

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.
*/
//To contact the author send an email to panthomakos@users.sourceforge.net

/*Demonstrates the creation of a network by reading weights from a file.*/

#include <nn-utility.h>
using namespace nn_utility;

int main(){
	layer<float> *hidden1 = new layer<float>();
	hidden1->define( "topology.txt", 0 );
	layer<float> *output = new layer<float>();
	output->define( "topology.txt", 1, &hidden1 );

	hidden1->write( cout );
	output->write( cout );
	
	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?