1. Olivier Grisel
  2. gumby


Olivier Grisel  committed 262f72c

fix style + train a model by default

  • Participants
  • Parent commits 91984b1
  • Branches sgd

Comments (0)

Files changed (1)

File experiments/xp_movie_prediction.py

View file
 from gumby.adapter.movie import Movie
 from gumby.adapter.movie import load_movie
 from gumby.adapter.movie import MovieAdapter
+from pysgd import SvmModel
 import logging
     end_generation = time.time()
-    log.info("generated %d frames in %03fs", BATCH_SIZE, end_generation-start)
+    log.info("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()
     log.info("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'))
     log.info("loaded %d frames in %0.3fs", len(i),
              time.time() - start)
+m = SvmModel()
+m.train(i, o)