DRSAD / iCaRL

96 stars 24 forks source link

modification for win10 pkl weight saving #8

Open chg0901 opened 2 years ago

chg0901 commented 2 years ago
        #  modification for win10 pkl weight saving
#         filename='model/accuracy:%.3f_KNN_accuracy:%.3f_increment:%d_net.pkl' % (accuracy, KNN_accuracy, i + 10)  # original version
        # first check if exist the “model” folder and create it, or
#         import os
        dirs = './model/'
        if not os.path.exists(dirs):
            os.makedirs(dirs)
            print("create the 'model' folder")
        else:
            print("exist the 'model' folder")
        # replace the ':' with '_' and change the 'i+10' to 'i+1'
        filename='./model/accuracy=%.3f_KNN_accuracy=%.3f_increment=%d_net.pkl' % (accuracy, KNN_accuracy, i + 1)