Olivier Grisel committed 262f72c

fix style + train a model by default

Comments (0)

Files changed (1)


 from import Movie
 from import load_movie
 from import MovieAdapter
+from pysgd import SvmModel
 import logging
     end_generation = time.time()
-"generated %d frames in %03fs", BATCH_SIZE, end_generation-start)
+"generated %d frames in %03fs",
+             BATCH_SIZE, end_generation - start)
     # dump the data set on disk so as to be able to quickly reuse it later
     # without going through brain adapting again
     end_conversion = time.time()"converted %d frames to %d training points in %03fs",
-             BATCH_SIZE, len(i), end_conversion-end_generation)
+             BATCH_SIZE, len(i), end_conversion - end_generation)
     print "saving " + INPUTS_FILENAME
     dump(i, file(INPUTS_FILENAME, 'wb'))"loaded %d frames in %0.3fs", len(i),
              time.time() - start)
+m = SvmModel()
+m.train(i, o)