I am solving large systems of non-linear PDEs using neural network and I have a total of 10 classes as python scripts mounted on the drive in colab. My algorithm in the main python script calls these 10 classes back and forth to find the solution in an iterative fashion. Training takes a lot of time even with the GPU and I am wondering if this is because of the main script repeatedly calling the classes from the drive. The scripts are not large in size (max 1000 lines each) though and I am not importing any data (all data are simulated from within the main script).

Any thoughts on this are appreciated. Thanks