set cnn and nn