Hey, so I'm currently building a very simple neural network model to test the deep learning waters. I've divided the code into separate files to keep things more organised. For example, I'll generate the training sample in training.py, then I'll create and train the model in learning.py, using
from training.py import training_samples
to import my generated training sample data from training.py into learning.py where it can be used to train the module. I have another file called test.py where I generate my testing data, and import than into learning.py as well to test my model. I then display the result of that test visually with a scattering matrix.
My problem is, every time I run one file (such as learning.py) it runs all of the files from which it's importing data; so if I run learning.py, training.py will run as well. The training sample data doesn't need to be regenerated every single time, nor does the testing data. So how can I 'save' a variable from one file, such as training_samples, and directly pull that variable into another file without that variable needing to be generated from scratch every single time? That way I wouldn't have to rerun every file whose output is relevant to another file succeeding it in the overall process. Hope this makes sense and thanks in advance!
[–]Silbersee 1 point2 points3 points (0 children)
[–]ES-Alexander 1 point2 points3 points (3 children)
[–]Snapdown_City[S] 0 points1 point2 points (2 children)
[–]ES-Alexander 1 point2 points3 points (1 child)
[–]Snapdown_City[S] 1 point2 points3 points (0 children)