def __init__(self, tensor_id, job_id, size, shape, recomputation_time, source_tensors=None, is_parameter=False, is_input_or_output=False):
    self.tensor_id = tensor_id
    self.job_id = job_id
    self.size = size
    self.swap_time = (self.size / PCIE_bandwidth)
    self.source_tensors = (source_tensors if (source_tensors is not None) else [])
    self.recomputation_time = recomputation_time
    self.recomputation_metric = (self.size / self.recomputation_time)
    self.is_parameter = is_parameter
    self.shape = shape
    if (self.is_parameter or is_input_or_output):
        self.in_gpu_at_beginning = True
    else:
        self.in_gpu_at_beginning = False
def __init__(self, tensor_id, job_id, size, shape, recomputation_time, source_tensors=None, is_parameter=False, is_input_or_output=False):
    self.tensor_id = tensor_id
    self.job_id = job_id
    self.size = size
    self.swap_time = (self.size / PCIE_bandwidth)
    self.source_tensors = (source_tensors if (source_tensors is not None) else [])
    self.recomputation_time = recomputation_time
    self.recomputation_metric = (self.size / self.recomputation_time)
    self.is_parameter = is_parameter
    self.shape = shape
    if (self.is_parameter or is_input_or_output):
        self.in_gpu_at_beginning = True
    else:
        self.in_gpu_at_beginning = False