|
@@ -41,7 +41,6 @@ def print_model_info(model, file=sys.stdout, input_size=None, input_var=None):
|
|
|
if name is None:
|
|
|
name = model.__class__.__name__
|
|
|
|
|
|
-
|
|
|
rows = []
|
|
|
default_size = 224
|
|
|
if hasattr(model, "meta"):
|
|
@@ -73,21 +72,3 @@ def print_model_info(model, file=sys.stdout, input_size=None, input_var=None):
|
|
|
headers=["Link name", "Input", "Output"],
|
|
|
tablefmt="fancy_grid"))
|
|
|
|
|
|
-
|
|
|
-if __name__ == "__main__":
|
|
|
- class Foo:
|
|
|
- attr = None
|
|
|
- def __str__(self):
|
|
|
- return f"<{hex(id(self))}: attr={self.attr}>"
|
|
|
-
|
|
|
-
|
|
|
- o = Foo()
|
|
|
- o.attr = Foo()
|
|
|
- o.attr.attr = Foo()
|
|
|
-
|
|
|
- print(o,
|
|
|
- get_attr_from_path(o, "attr"),
|
|
|
- get_attr_from_path(o, "attr/"),
|
|
|
- get_attr_from_path(o, "attr/attr"),
|
|
|
- sep="\n"
|
|
|
- )
|