shortcut template

This commit is contained in:
Francesco Gatti
2018-12-19 22:36:46 +01:00
parent bc0ea65766
commit 5f25e0b5f6
2 changed files with 50 additions and 1 deletions
+20 -1
View File
@@ -17,7 +17,8 @@ enum layerType_t {
LAYER_SOFTMAX,
LAYER_ROUTE,
LAYER_REORG,
LAYER_REGION
LAYER_SHORTCUT,
LAYER_REGION,
};
/**
@@ -50,6 +51,7 @@ public:
case LAYER_SOFTMAX: return "Softmax";
case LAYER_ROUTE: return "Route";
case LAYER_REORG: return "Reorg";
case LAYER_SHORTCUT: return "Shortcut";
case LAYER_REGION: return "Region";
default: return "unknown";
}
@@ -282,6 +284,23 @@ public:
int stride;
};
/**
Shortcut layer
sum with stride another layer
*/
class Shortcut : public Layer {
public:
Shortcut(Network *net, Layer *backLayer, int layers_n);
virtual ~Shortcut();
virtual layerType_t getLayerType() { return LAYER_SHORTCUT; };
virtual dnnType* infer(dataDim_t &dim, dnnType* srcData);
public:
Layer *backLayer;
};
struct box {
int cl;