Update how the model is printed

This commit is contained in:
Jensun Ravichandran 2021-06-07 16:58:00 +02:00
parent 3aa33fd182
commit 34ffeb95bc

View File

@ -12,8 +12,10 @@ from prototorch.modules import WTAC, LambdaLayer
class ProtoTorchBolt(pl.LightningModule):
def __repr__(self):
super_repr = super().__repr__()
return f"ProtoTorch Bolt:\n{super_repr}"
surep = super().__repr__()
indented = "".join([f"\t{line}\n" for line in surep.splitlines()])
wrapped = f"ProtoTorch Bolt(\n{indented})"
return wrapped
class PrototypeModel(ProtoTorchBolt):