modelfile = 25, /** model file for loading config for backbone layer */
input_layers = 26,
output_layers = 27,
+ trainable = 28,
unknown
};
template <typename... Args>
ActivationLayer(ActivationType at = ActivationType::ACT_NONE, Args... args) :
Layer(args...) {
+ setTrainable(false);
setActivation(at);
}
/**
* @brief Constructor of Flatten Layer
*/
- template <typename... Args> FlattenLayer(Args... args) : Layer(args...) {}
+ template <typename... Args> FlattenLayer(Args... args) : Layer(args...) {
+ setTrainable(false);
+ }
/**
* @brief Destructor of Flatten Layer
output_layers.push_back(concat_layers[i]);
}
break;
+ case PropertyType::trainable:
+ if (!value.empty()) {
+ status = setBoolean(trainable, value);
+ throw_status(status);
+ }
+ break;
default:
std::string msg =
"[Layer] Unknown Layer Property Key for value " + std::string(value);
* Pooling2DLayer has 12, 13, 14, 15 properties.
* BatchNormalizationLayer has 0, 1, 5, 6, 7 properties.
*/
-static std::array<std::string, 29> property_string = {
+static std::array<std::string, 30> property_string = {
"input_shape",
"normalization",
"standardization",
"modelfile",
"input_layers",
"output_layers",
+ "trainable",
"unknown"};
unsigned int parseLayerProperty(std::string property) {