Skip to content

Commit 1514810

Browse files
committed
updated docs
1 parent 08a6a25 commit 1514810

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/LightningModule/properties.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,17 @@ self.trainer.current_epoch
3838
...
3939
```
4040

41+
## Debugging
42+
The LightningModule also offers these tricks to help debug.
43+
44+
---
45+
#### example_input_array
46+
In the LightningModule init, you can set a dummy tensor for this property
47+
to get a print out of sizes coming into and out of every layer.
48+
```python
49+
def __init__(self):
50+
# put the dimensions of the first input to your system
51+
self.example_input_array = torch.rand(5, 28 * 28)
52+
```
53+
54+

0 commit comments

Comments
 (0)