ComplexSeparatedCombination

class ComplexSeparatedCombination(combination=None, combination_kwargs=None, imag_combination=None, imag_combination_kwargs=None)[source]

Bases: Combination

A combination for mixed complex & real representations.

Initialize the combination.

Note

if non-instantiated combinations are passed, separate instances will be created for real and imaginary parts

Parameters:

Methods Summary

forward(xs)

Combine a sequence of individual representations.

output_shape(input_shapes)

Calculate the output shape for the given input shapes.

Methods Documentation

forward(xs)[source]

Combine a sequence of individual representations.

Parameters:

xs (Sequence[FloatTensor]) – shape: (*batch_dims, *input_dims_i) the individual representations

Return type:

FloatTensor

Returns:

shape: (*batch_dims, *output_dims) a combined representation

output_shape(input_shapes)[source]

Calculate the output shape for the given input shapes.

Note

this method runs a single forward pass if no symbolic computation is available.

Parameters:

input_shapes (Sequence[Tuple[int, …]]) – the input shapes without the batch dimensions

Return type:

Tuple[int, …]

Returns:

the output shape