I'm trying to replace all activation layers of a certain type, there must be a simpler way to do this?

iv3 = NetModel["Inception V3 Trained on ImageNet Competition Data"];
NetReplace[iv3, Ramp -> ElementwiseLayer["ELU"]]

enter image description here


1 Answer 1


At first glance

NetReplace[iv3, ElementwiseLayer[Ramp] -> ElementwiseLayer["ELU"]]

seems to do what you want


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.