davidstutz / caffe-tools

Some tools and examples for pyCaffe including LMDB I/O, custom Python layers and monitoring training error and loss.
77 stars 30 forks source link

Lmdb Error of not having enough disk space size. #3

Closed rajatkb closed 5 years ago

rajatkb commented 6 years ago

Figured that since the code was giving a possible of max 1TB so reduced it to a GB and it worked So i have included this in the code

def write(self, images, labels = [] , max_data_map_size=1073741824):
      ## code ##  
      env = lmdb.open(self._lmdb_path, map_size = max(max_data_map_size, images.nbytes))
      ## atleast this will give a bit of flexibility
davidstutz commented 5 years ago

Sounds reasonable, didn't think about that. Feel free to make a PR for that ;)