def prepend_batch_seq_axis(tensor):
    """
    CNTK uses 2 dynamic axes (batch, sequence, input_shape...).
    To have a single sample with length 1 you need to pass (1, 1, input_shape...)
    This method reshapes a tensor to add to the batch and sequence axis equal to 1.
    :param tensor: The tensor to be reshaped
    :return: Reshaped tensor with batch and sequence axis = 1
    """
    return tensor.reshape((1, 1,) + tensor.shape)