Repository for summer project that followed on from my MPhys final year project Designing Photonic Crystal Waveguides Using Neural Networks (June 2022) supervised by Dr Sebastian Schulz at the University of St Andrews.
simulations: cluster_generate.py uniformly samples the 7d design space and simulates the band structures of photonic crystal waveguides using MIT Photonic Bands. Simulations are either 3D or 2D approximations using the effective period method depending on the chosen control file simulations/MPB-control. As simulations are time consuming (taking minutes to several hours), they were run on the Kennedy High Performance Computing Cluster in batches. The corresponding SLURM jobs are in 2D-jobs and 3D-jobs.
preprocessing: merge_csvs.py combines the output of batches of simulations into a single csv. prepare_training_sets.py rescales features to the range
NN-tuning: Neural Networks were built using Keras and trained and evaluated with cluster_train.py. Hyperparameters were set in SLURM jobs with the best performing hyperparameters for the 2D and 3D datasets being 2D-jobs/tune-7.job and 3D-jobs/tune-1.job, respectively.
transfer-learning: The best 2D NN served as a pretrained model for the 3D dataset and this "transfer learning" process was done using transfer_learning.py.
learning-curve: To assess the impact of training set size on NN performance, a learning curve was constructed. NNs were trained and tested using learning-curve.py on subsets of varying size in a number of jobs learning-curve-jobs.
NN-speed-test Measures the inference speed of trained NN.
This project followed Anson Ho's undergraduate disseration which aimed to predict figures of merit instead of band structures.