VS Code crashes when running a cell that produces a lot of output
See original GitHub issueI am trying to print model summary in tensorflow and I think the model is large and it’s crashing my notebook. The model is ResNet101.
The whole computer comes to a halt, memory usage goes up to 99% and VS Code crashes. I have 16 GB of ram, so I didn’t think printing something large would actually eat all my ram. Also, because the kernel crashes, all the variables are lost like history = model.fit() which I need to fine-tune the model afterwards. Moreover, I need to print base_model summary in order to choose from which layer to fine-tune from.
Is there a way to print the summary in another way and save the entire notebook with the variables, so I can continue working? I have checkpoints for model weights, but I need to keep track of past epochs through history to resume training afterwards.
I will try using.py
files, but I want to know if there is a way to solve this problem for jupyter.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:34 (14 by maintainers)
Top GitHub Comments
hi everyone which, but this should be fixed in the next release (we were unable to take last month).
you can try installing the latest pre-release version of the jupyter extension and that should work.
@DonJayamanne by the way, if you saw the recording in the demo2.zip, I printed only the layers of the model using a for loop, which is a very long list of text, and it runs instantly.