base
ModelSignatureWrapper(model)
¶
Bases: Module
Model wrapper used to retrieve input shape. It can be used as a decorator of nn.Module, the first call to the forward method will retrieve the input shape and store it in the input_shapes attribute. It will also save the model summary in a file called model_summary.txt in the current working directory.
Source code in quadra/models/base.py
21 22 23 24 25 26 27 28 29 30 |
|
cpu(*args, **kwargs)
¶
Handle calls to to method returning the underlying model.
Source code in quadra/models/base.py
62 63 64 65 66 |
|
forward(*args, **kwargs)
¶
Retrieve the input shape and forward the model, if the input shape is already retrieved it will just forward the model.
Source code in quadra/models/base.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
half(*args, **kwargs)
¶
Handle calls to to method returning the underlying model.
Source code in quadra/models/base.py
56 57 58 59 60 |
|
to(*args, **kwargs)
¶
Handle calls to to method returning the underlying model.
Source code in quadra/models/base.py
50 51 52 53 54 |
|