network print

This commit is contained in:
Francesco Gatti
2017-08-08 14:59:25 +02:00
parent 7d570c0df4
commit 0a9957ba18
6 changed files with 69 additions and 2 deletions
+17
View File
@@ -38,6 +38,23 @@ public:
dataDim_t input_dim, output_dim;
value_type *dstData; //where results will be putted
std::string getLayerName() {
layerType_t type = getLayerType();
switch(type) {
case LAYER_DENSE: return "Dense";
case LAYER_CONV2D: return "Conv2d";
case LAYER_ACTIVATION: return "Activation";
case LAYER_FLATTEN: return "Flatten";
case LAYER_MULADD: return "MulAdd";
case LAYER_POOLING: return "Pooling";
case LAYER_SOFTMAX: return "Softmax";
case LAYER_ROUTE: return "Route";
case LAYER_REORG: return "Reorg";
case LAYER_REGION: return "Region";
default: return "unknown";
}
}
protected:
Network *net;
cudnnTensorDescriptor_t srcTensorDesc, dstTensorDesc;
+1
View File
@@ -46,6 +46,7 @@ public:
value_type* infer(dataDim_t &dim, value_type* data);
bool addLayer(Layer *l);
void print();
cudnnDataType_t dataType;
cudnnTensorFormat_t tensorFormat;
+1
View File
@@ -87,6 +87,7 @@
} \
}
void printCenteredTitle(const char *title, char fill, int dim);
void readBinaryFile(const char* fname, int size, value_type** data_h, value_type** data_d, int seek = 0);
int checkResult(int size, value_type *data_d, value_type *correct_d, bool device = true);
void printDeviceVector(int size, value_type* vec_d, bool device = true);