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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.