1 command network inference

This commit is contained in:
Francesco Gatti
2017-07-02 20:47:14 +02:00
parent cfa43a8580
commit ea59d7ca53
4 changed files with 43 additions and 1 deletions
+15
View File
@@ -5,16 +5,31 @@
namespace tkDNN {
struct dataDim_t;
class Layer;
const int MAX_LAYERS = 256;
class Network {
public:
Network();
virtual ~Network();
/**
Do inferece for every added layer
*/
value_type* infer(dataDim_t &dim, value_type* data);
bool addLayer(Layer *l);
cudnnDataType_t dataType;
cudnnTensorFormat_t tensorFormat;
cudnnHandle_t cudnnHandle;
cublasHandle_t cublasHandle;
private:
Layer* layers[MAX_LAYERS]; //contains layers of the net
int num_layers; //current number of layers
};
}