reuse_weights[k] = v
if isinstance(k, str):
try:
new_idx = self._classes.index(k) // raise ValueError if not found
except ValueError:
raise ValueError(
"{} not found in new class names {}".format(k, self._classes))
reuse_weights.pop(k)
reuse_weights[new_idx] = v
else:
new_map = {}
for x in reuse_weights:
After Change
raise ValueError(
"Index {} out of bounds for new class names".format(k))
new_keys.append(k)
reuse_weights = dict(zip(new_keys, new_vals))
else:
new_map = {}
for x in reuse_weights:
try: