gives a net in which the name old for a layer is replaced with new.


performs all renamings specified by the rulei.


use a function f to map existing layer names to new names.


  • NetRename can only be used on NetChain and NetGraph objects that were created using an association syntax of the form <|"name1"->layer1,"name2"->layer2,|>.
  • NetRename will only perform renaming at the outermost level of a NetChain or NetGraph. It will not affect nested chains and graphs.


open allclose all

Basic Examples  (4)

Rename a single layer in a NetChain:

Rename a single layer in a NetGraph:

Rename multiple layers simultaneously:

Rename layers using a renaming function:

Possible Issues  (1)

Renaming should produce unique names:

Introduced in 2018