NetPort
NetPort[{n,"port"}]
represents the specified port for layer number n in a NetGraph or similar construct.
NetPort[{"name","port"}]
represents the specified port for the layer with the specified name.
NetPort["port"]
represents the specified input or output port for a complete net.
Details
- When used in NetGraph, NetPort[{layer,"port"}] refers to the named output port of a layer when used on the left-hand side of a rule, and a named input port of a layer when used on the right-hand side of a rule.
- When used in a NetGraph, NetPort["port"] refers to an input of the entire graph when used on the left-hand side of a rule, and an output of the entire graph when used on the right-hand side of a rule.
- net[data,NetPort[oport]] can be used to obtain the value of the net at oport when it is applied to the specified data. oport must refer to an output port, a subnet of the net, or a layer.
- net[data,{NetPort[oport1],NetPort[oport2],…}] returns an association <NetPort[oport1]->…,NetPort[oport2]->…,…> whose values are the values of the net at oporti when the net is applied to the specified data.
Examples
open allclose allSee Also
Related Guides
Introduced in 2016
(11.0)
| Updated in 2017 (11.2)