|
|
@ -272,8 +272,7 @@ def load_pretrained(
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
state_dict = load_state_dict_from_hf(pretrained_loc)
|
|
|
|
state_dict = load_state_dict_from_hf(pretrained_loc)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
_logger.warning("No pretrained weights exist or were found for this model. Using random initialization.")
|
|
|
|
raise ValueError("No pretrained weights exist or were found for this model.")
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if filter_fn is not None:
|
|
|
|
if filter_fn is not None:
|
|
|
|
# for backwards compat with filter fn that take one arg, try one first, the two
|
|
|
|
# for backwards compat with filter fn that take one arg, try one first, the two
|
|
|
|