async save(dirname){
        fse.ensureDirSync(dirname);

        await this.model.save("file://" + dirname);
        await fse.writeJson(path.join(dirname, "labels.json"), {
            Labels: this.data.labels
        });

        this.currentModelPath = dirname;
    }
/**
     * Function to save pre-trained model
     * 
     * @param string dirname
     * @return Promise
     */
Function to save pre-trained model

@param string dirname
@return Promise
Function to save pre - trained model @param string dirname @return Promise
async save(dirname){
        fse.ensureDirSync(dirname);
        await this.model.save("file://" + dirname);
        await fse.writeJson(path.join(dirname, "labels.json"), {
            Labels: this.data.labels
        });
        this.currentModelPath = dirname;
    }
async save ( dirname ) { fse . ensureDirSync ( dirname ) ; await this . model . save ( "file://" + dirname ) ; await fse . writeJson ( path . join ( dirname , "labels.json" ) , { Labels : this . data . labels } ) ; this . currentModelPath = dirname ; }
Function to save pre-trained model
Function to save pre - trained model