OutputPorts

OutputPorts

is an option to specify the number, names or shapes of output ports for some neural net layers.

Details

  • OutputPorts is typically used in PlaceholderLayer.
  • Typical settings for OutputPorts include:
  • Automaticinfer number of ports and their shapes from NetChain or NetGraph connectivity
    nn ports with default names and unspecified shapes
    {"name1","name2",}explicit port names with unspecified shapes
    {shape1,shape2,}default port names with specified shapes or encoders
    <|"name1"shape1,|>explicit port names with specified shapes or encoders
  • Shape specifications for each port include:
  • "Real"a single real number
    "Integer"a single integer
    Restricted["Integer",n]an integer between 1 and n
    na vector of length n
    {n1,n2,}an array of dimensions n1×n2×
    "Varying"a vector whose length is variable
    {"Varying",n2,n3,}an array whose first dimension is variable and remaining dimensions are n2×n3×
    NetDecoder[]a decoder

Examples

open allclose all

Basic Examples  (1)

By default, PlaceholderLayer has a single output port:

Use OutputPorts to create a PlaceholderLayer with three ports having default names and unspecified shapes:

Scope  (3)

Create a PlaceholderLayer with two outputs having explicit names and unspecified shapes:

Create a PlaceholderLayer with four outputs having default names and specified shapes:

Create a PlaceholderLayer with two outputs having explicit names and specified shapes:

Wolfram Research (2020), OutputPorts, Wolfram Language function, https://reference.wolfram.com/language/ref/OutputPorts.html.

Text

Wolfram Research (2020), OutputPorts, Wolfram Language function, https://reference.wolfram.com/language/ref/OutputPorts.html.

CMS

Wolfram Language. 2020. "OutputPorts." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OutputPorts.html.

APA

Wolfram Language. (2020). OutputPorts. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OutputPorts.html

BibTeX

@misc{reference.wolfram_2024_outputports, author="Wolfram Research", title="{OutputPorts}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/OutputPorts.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_outputports, organization={Wolfram Research}, title={OutputPorts}, year={2020}, url={https://reference.wolfram.com/language/ref/OutputPorts.html}, note=[Accessed: 21-December-2024 ]}