RepeatToMatchBlock(*args: Any, **kwargs: Any)¶
A repeat-to-match block. This blocks takes two tensors and a dimension index as an input. Then when it’s forward method is called, it matches the specified the dimension (with :param repeat_at_idx) of the first tensor with the specified dimension (:param repeat_at_idx) of the second tensor. This is done by repeating the first tensor n times in dimension in dimension :param repeat_at_idx. Here n = tensor_1.shape[repeat_at_idx] - tensor_0.shape[repeat_at_idx]. As a constraint the first tensor has to satisfy the following condition: tensor_0[repeat_at_idx] == 1
in_keys – The keys identifying the input tensors.
out_keys – One key identifying the output tensors.
in_shapes – List of input shapes.
repeat_at_idx – Specify the dimension that should be matched between the tensors.