Unverified Commit d416b2c2 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Fix `handle_legacy_interface` when passing strings (#5063)

parent 65438e9e
......@@ -43,6 +43,7 @@ def handle_legacy_interface(**weights: Tuple[str, Union[Optional[W], Callable[[D
if (
(weights_param not in kwargs and pretrained_param not in kwargs)
or isinstance(weights_arg, WeightsEnum)
or (isinstance(weights_arg, str) and weights_arg != "legacy")
or weights_arg is None
):
continue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment