在我的代码中,我试图建立一个神经网络。由于有点没编程,我有点生锈。我正在尝试使用向量来创建灵活的图层数组。我有这样做的理由,但我遇到一个错误,说:
Error C2923 'std::vector': 'Layers' is not a valid template type argument for parameter '_Ty'
这是我的代码
#include<vector>
#include "Layers.h"
class Network
{
public:
Network(unsigned short Num_Of_Layers, unsigned short Layers_size, short Layers_rate_of_change = -1);
~Network();
void ForwardProp();
void BackProp();
std::vector<Layers> ANN;
};
这也是我的图层类:
#include "Neuron.h"
#include<iostream>
#include<vector>
class Layers
{
public:
Layers();
Layers(int Neurons);
~Layers();
std::vector<Neuron> L;
};
class图层已损坏。它应该用大括号括起来。
#include "Neuron.h"
#include<iostream>
#include<vector>
class Layers() {
Layers(int Neurons); // this parameter seems non-sence
~Layers();
std::vector<Neuron> L;
};