NetRename
NetRename[net,"old""new"]
gives a net in which the name old for a layer is replaced with new.
NetRename[net,NetPort["old"]NetPort["new"]]
gives a net in which the name old for an input or output port is replaced with new.
NetRename[net,{rule1,rule2,…}]
performs all renamings specified by the rulei.
NetRename[net,f]
uses a function f to map existing layer names to new names.
NetRename[net,rules,levelspec]
renames layers and ports nested at level levelspec.
Details
- NetRename is typically used to rename layers and ports in NetChain and NetGraph objects.
- In NetRename[net,rules,levelspec], levelspec can be:
-
n levels 1 through n {n} level n only {n1,n2} levels n1 through n2 - By default, NetRename will only perform renaming at the outermost level of a NetChain or NetGraph. It will not affect nested chains and graphs.
Examples
open allclose allText
Wolfram Research (2018), NetRename, Wolfram Language function, https://reference.wolfram.com/language/ref/NetRename.html (updated 2021).
CMS
Wolfram Language. 2018. "NetRename." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/NetRename.html.
APA
Wolfram Language. (2018). NetRename. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetRename.html