|
|
|
|
|
|
else: |
|
|
|
# We want to duplicate the last value in the array, multiplied by the padding_value. |
|
|
|
padding = np.array(self[-1], dtype=np.float32) * self.padding_value |
|
|
|
return [padding] * (training_length - leftover) + self[:] |
|
|
|
return self[:] + [padding] * (training_length - leftover) |
|
|
|
|
|
|
|
else: |
|
|
|
return self[len(self) - batch_size * training_length :] |
|
|
|