lmjohns3 / theanets

Neural network toolkit for Python
http://theanets.rtfd.org
MIT License
328 stars 74 forks source link

For the dataset.py/init_callable, you shoul also catch Attribute error #79

Closed nkundiushuti closed 9 years ago

nkundiushuti commented 9 years ago

I have implemented the Largedataset class as you recommended, and the dataset method yields this error: AttributeError: LargeDataset instance has no attribute 'len' In my opinion, you should also catch this error in dataset.py try: self.iteration_size = len(samples) except TypeError: # has no len If you want, I can share the LargeDataset class with you, but it's a bit particular to my problem. I have added the len attribute to return the number of batches in one dataset file which is loaded from hard drive.

lmjohns3 commented 9 years ago

This is a good idea! In the meantime, I have moved the Dataset class to another package -- https://github.com/lmjohns3/downhill. It looks like there's not a quick way to move an issue to another repository, so I'm going to close this one here and open it there: https://github.com/lmjohns3/downhill/issues/1