changed test_run_cnn_switch to record loss, obj, dev acc per epoch and make it a function