if is_layer(layer, "Dropout"):
return Dropout(layer.rate)
if is_layer(layer, "Activation"):
return Activation(layer.activation)
if is_layer(layer, "Flatten"):
return Flatten()
if is_layer(layer, "GlobalAveragePooling"):
return GlobalAveragePooling2D()
After Change
if is_layer(layer, "ReLU"):
return torch.nn.ReLU()
if is_layer(layer, "Softmax"):
return torch.nn.Softmax()
if is_layer(layer, "Flatten"):
return TorchFlatten()