def to_tensor_item(value):
    """
    Transform from None to -1 or retain the initial value.

    :param value: a value to be changed to an element/item in a tensor
    :return: a number representing the value, tensor with value -1 represents
    the None input
    """
    if value is None:
        value = -1.0
    return value