represents a net layer whose operation is undefined.
indicates a tag and information given by the association assoc.
Details and Options
- PlaceholderLayer is typically produced when trying to import neural nets from external formats containing unsupported operations.
- PlaceholderLayer can be used in NetChain or NetGraph to construct net objects that can be manipulated but cannot be trained or evaluated on an input.
- PlaceholderLayer exposes the following options:
"Arrays" None a list of array names or an association mapping array names to numeric arrays InputPorts Automatic input ports OutputPorts Automatic output ports
- Since the layer does not have any evaluation or training behavior, values for "Arrays" do not have any effect besides communicating that the layer is a placeholder for an operation using arrays.
- Option InputPorts can be used to specify the number, names or shapes of input ports. If InputPorts is not specified, the number of ports and their shapes are inferred from NetChain or NetGraph connectivity.
- By default, PlaceholderLayer exposes an input port called "Input" and an output port called "Output" with unspecified shapes. Options "Input" and "Output" are available as shortcuts for shape specification in the single-port case.
- PlaceholderLayer does not perform any shape inference and will allow any combination of input and output ports with any given shape when constructed.
- Options[PlaceholderLayer] gives the list of default options to construct the layer. Options[PlaceholderLayer[…]] gives the list of default options to evaluate the layer on some data.
- Information[PlaceholderLayer[…]] gives a report about the layer.
- Information[PlaceholderLayer[…],prop] gives the value of the property prop of PlaceholderLayer[…]. Possible properties are the same as for NetGraph.
Examplesopen allclose all
Basic Examples (2)
Create a PlaceholderLayer with two inputs and three outputs having default names and unspecified shapes:
Create a PlaceholderLayer with two inputs and three outputs having explicit names and unspecified shapes:
Create a PlaceholderLayer with two inputs and three outputs having default names and specified shapes:
Create a PlaceholderLayer with two inputs and three outputs having explicit names and specified shapes:
PlaceholderLayer is typically produced during import from external formats. Create an ONNX model file with an unsupported operator:
Import the model. PlaceholderLayer is used to represent the unsupported operator:
Nets imported with PlaceholderLayer cannot be evaluated on an input:
The missing layer can be added back in various ways. One effective but inefficient solution is to use ordinary Wolfram Language code. Implement the missing operation in Wolfram Language code and create a function to reproduce the results of the full net:
Wolfram Research (2020), PlaceholderLayer, Wolfram Language function, https://reference.wolfram.com/language/ref/PlaceholderLayer.html.
Wolfram Language. 2020. "PlaceholderLayer." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PlaceholderLayer.html.
Wolfram Language. (2020). PlaceholderLayer. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PlaceholderLayer.html