yajiemiao / pdnn

PDNN: A Python Toolkit for Deep Learning. http://www.cs.cmu.edu/~ymiao/pdnntk.html
Apache License 2.0
224 stars 105 forks source link

Implemented io_func.smart_open to support file compression #13

Closed MaigoAkisame closed 9 years ago

MaigoAkisame commented 9 years ago

I added the function "smart_open" in io_func/init.py. This function handles compression automatically based on the extension of the filename. When reading a file that doesn't exist, it will search for corresponding compressed files. I have also replaced all uses of "open" throughout the repo to "smart_open".