Kernel crashes when dimension error on an Apple Silicon Device

Hello everybody, I have noticed that whenever there is a dimension error with a tensor or a mismatch between the input shape of a model and the shape of the data the kernel crashes. For example, I was running this snippet of code model_2(rand_image_tensor.unsqueeze(0).to(device)) and there seemed to be a miss match in the input shapes, there was no error printed out or any kind of warning, the kernel just crashed. I am following the tutorial and he is running it on google colab, so I wrote the same code that he wrote, changing the device-agnostic code to match with Apple silicon and it worked fine for him but is crashing for me. I am running a conda environment and have installed Jupyter Lab the way that has been shown on the official website, this issue also persists on the VSCode Jupyterlab extension. There is no error displayed just that the kernel crashes. I am running Python 3.11 with the stable Pytorch packages, and I am running this on an M1 Max chip. Is this a bug with all computers? And is there a fix to this, so that when I am building models without a guide I can understand what the error is, and debug it with the proper methods?

Note I am running pytorch version 2.0.1

Thank you so much for you help!!!