def scaled_input(emb, batch_size=16, num_batch=1, baseline=None, start_i=None, end_i=None):
    if (baseline is None):
        baseline = torch.zeros_like(emb)
    num_points = (batch_size * num_batch)
    scale = (1.0 / num_points)
    if (start_i is None):
        step = ((emb.unsqueeze(0) - baseline.unsqueeze(0)) * scale)
        res = torch.cat([torch.add(baseline.unsqueeze(0), (step * i)) for i in range(num_points)], dim=0)
        return (res, step[0])
    else:
        step = ((emb - baseline) * scale)
        start_emb = torch.add(baseline, (step * start_i))
        end_emb = torch.add(baseline, (step * end_i))
        step_new = ((end_emb.unsqueeze(0) - start_emb.unsqueeze(0)) * scale)
        res = torch.cat([torch.add(start_emb.unsqueeze(0), (step_new * i)) for i in range(num_points)], dim=0)
        return (res, step_new[0])
def scaled_input(emb, batch_size=16, num_batch=1, baseline=None, start_i=None, end_i=None):
    if (baseline is None):
        baseline = torch.zeros_like(emb)
    num_points = (batch_size * num_batch)
    scale = (1.0 / num_points)
    if (start_i is None):
        step = ((emb.unsqueeze(0) - baseline.unsqueeze(0)) * scale)
        res = torch.cat([torch.add(baseline.unsqueeze(0), (step * i)) for i in range(num_points)], dim=0)
        return (res, step[0])
    else:
        step = ((emb - baseline) * scale)
        start_emb = torch.add(baseline, (step * start_i))
        end_emb = torch.add(baseline, (step * end_i))
        step_new = ((end_emb.unsqueeze(0) - start_emb.unsqueeze(0)) * scale)
        res = torch.cat([torch.add(start_emb.unsqueeze(0), (step_new * i)) for i in range(num_points)], dim=0)
        return (res, step_new[0])