(image, label, name)
Calls the make_mnist_db binary to generate a leveldb from a mnist dataset
Calls the make_mnist_db binary to generate a leveldb from a mnist dataset
Calls the make_mnist_db binary to generate a leveldb from a mnist dataset
def GenerateDB(image, label, name):
    '''Calls the make_mnist_db binary to generate a leveldb from a mnist dataset'''
    name = os.path.join(data_folder, name)
    print('DB: ', name)
    if not os.path.exists(name):
        syscall = "/usr/local/bin/make_mnist_db --channel_first --db leveldb --image_file " + image + " --label_file " + label + " --output_file " + name
        # print "Creating database with: ", syscall
        os.system(syscall)
    else:
        print("Database exists already. Delete the folder if you have issues/corrupted DB, then rerun this.")
        if os.path.exists(os.path.join(name, "LOCK")):
            # print "Deleting the pre-existing lock file"
            os.remove(os.path.join(name, "LOCK"))
def GenerateDB ( image , label , name ) : name = os . path . join ( data_folder , name ) print ( 'DB: ' , name ) if not os . path . exists ( name ) : syscall = "/usr/local/bin/make_mnist_db --channel_first --db leveldb --image_file " + image + " --label_file " + label + " --output_file " + name # print "Creating database with: ", syscall os . system ( syscall ) else : print ( "Database exists already. Delete the folder if you have issues/corrupted DB, then rerun this." ) if os . path . exists ( os . path . join ( name , "LOCK" ) ) : # print "Deleting the pre-existing lock file" os . remove ( os . path . join ( name , "LOCK" ) )