working on run_cnn_switch.m for random inputs