adding efficient version of convert trained dbn to svm to avoid thrashing