diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-30 23:15:03 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-30 23:15:03 +0200 |
commit | 7268035fb9e57342612a8cc50a1fe04e8841ca2f (patch) | |
tree | 8d4cf3743975bd25f2c04d6a56ff3d4608a7e8d9 /text_recognizer/networks/util.py | |
parent | 92fc1c7ed2f9f64552be8f71d9b8ab0d5a0a88d4 (diff) |
attr bug fix, properly loading network
Diffstat (limited to 'text_recognizer/networks/util.py')
-rw-r--r-- | text_recognizer/networks/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/text_recognizer/networks/util.py b/text_recognizer/networks/util.py index e822c57..c94e8dc 100644 --- a/text_recognizer/networks/util.py +++ b/text_recognizer/networks/util.py @@ -24,6 +24,6 @@ def activation_function(activation: str) -> Type[nn.Module]: def load_partial_fn(fn: str, **kwargs: Any) -> partial: - """Loads partial function.""" + """Loads partial function/class.""" module = import_module(".".join(fn.split(".")[:-1])) - return partial(getattr(module, fn.split(".")[0]), **kwargs) + return partial(getattr(module, fn.split(".")[-1]), **kwargs) |