caffe - can't get access to python lmdb , ' object has no attribute 'Environment'' -
i using lmdb python load data
def create_dataset(): img_db_fn = 'data/image_train.lmdb' img_env = lmdb.environment(img_db_fn, map_size=1099511627776) img_txn = img_env.begin(write=true, buffers=true) keys = np.arange(100000) np.random.shuffle(keys) img_fns = glob.glob('data/positive/*.jpg') img_fns += glob.glob('data/negtive/*.jpg') print len(img_fns) , len(jnt_fns) i, img_fn in enumerate( img_fns ): img_datum = get_img_datum(img_fn) key = '%06d' % keys[i] img_txn.put(key, img_datum.serializetostring()) if % 10000 == 0: print 'commit',i img_txn.commit() img_txn = img_env.begin(write=true, buffers=true) img_txn.commit() img_env.close()
i got error saying 'img_env = lmdb.environment(img_db_fn, map_size=1099511627776) attributeerror: 'module' object has no attribute 'environment''
i guess might use lmdb
1 of personal module names , conflicts standard lmdb
module
Comments
Post a Comment