spark.nn.interfaces.control.concat#

Classes#

ConcatConfig

Concat configuration class.

Concat

Combines several streams of inputs of the same type into a single stream.

ConcatReshapeConfig

ConcatReshape configuration class.

ConcatReshape

Combines several streams of inputs of the same type into a single stream.

Module Contents#

class spark.nn.interfaces.control.concat.ConcatConfig(__skip_validation__=False, **kwargs)[source]#

Bases: spark.nn.interfaces.control.base.ControlInterfaceConfig

Concat configuration class.

Parameters:

__skip_validation__ (bool)

num_inputs: int[source]#
class spark.nn.interfaces.control.concat.Concat(config=None, **kwargs)[source]#

Bases: spark.nn.interfaces.control.base.ControlInterface

Combines several streams of inputs of the same type into a single stream.

Init:

num_inputs: int payload_type: type[SparkPayload]

Input:

input: type[SparkPayload]

Output:

output: type[SparkPayload]

Parameters:

config (ConcatConfig | None)

config: ConcatConfig[source]#
num_inputs[source]#
build(input_specs)[source]#

Build method.

Parameters:

input_specs (dict[str, spark.core.specs.PortSpecs])

Return type:

None

__call__(inputs)[source]#

Merge all input streams into a single data output stream.

Parameters:

inputs (list[spark.core.payloads.SparkPayload])

Return type:

spark.nn.interfaces.control.base.ControlInterfaceOutput

class spark.nn.interfaces.control.concat.ConcatReshapeConfig(__skip_validation__=False, **kwargs)[source]#

Bases: ConcatConfig

ConcatReshape configuration class.

Parameters:

__skip_validation__ (bool)

reshape: tuple[int, Ellipsis][source]#
class spark.nn.interfaces.control.concat.ConcatReshape(config=None, **kwargs)[source]#

Bases: spark.nn.interfaces.control.base.ControlInterface

Combines several streams of inputs of the same type into a single stream.

Init:

num_inputs: int reshape: tuple[int, …] payload_type: type[SparkPayload]

Input:

input: type[SparkPayload]

Output:

output: type[SparkPayload]

Parameters:

config (ConcatReshapeConfig | None)

config: ConcatReshapeConfig[source]#
reshape[source]#
num_inputs[source]#
build(input_specs)[source]#

Build method.

Parameters:

input_specs (dict[str, spark.core.specs.PortSpecs])

Return type:

None

__call__(inputs)[source]#

Merge all input streams into a single data output stream. Output stream is reshape to match the pre-specified shape.

Parameters:

inputs (list[spark.core.payloads.SparkPayload])

Return type:

spark.nn.interfaces.control.base.ControlInterfaceOutput