def METHOD_NAME(self, input):
    num_dim = input.dim()
    assert num_dim in [2, 3], f'expected the input to have 2 or 3 dimensions, but got {num_dim} dimensions'
    l_in = input.shape[-1]
    def _convert_int_to_list(item):
        if isinstance(item, int):
            return [item] * 1
        else:
            return item
    padding = _convert_int_to_list(self.padding)
    kernel_size = _convert_int_to_list(self.kernel_size)
    stride = _convert_int_to_list(self.stride)
    l_out = math.floor((l_in + 2 * padding[0] - kernel_size[0]) / stride[0] + 1)
    result_shape = tuple(input.shape[:-1]) + (l_out,)
    return torch.empty(result_shape, device='meta')