It’s not necessarily a PyTorch issue, since the Jupyter kernel might die without printing a proper error message due to other issues in the code.
Since you cannot run the code in a terminal to get a proper error message, I would recommend to remove code snippets until you can properly isolate the kernel restart to a small code snippet.