f22814f2405f83179c99f1fd4b895671bbdb124c,tools/scripts/features/lmdb_conversion.py,LMDBConversion,extract,#LMDBConversion#,76

Before Change


                    os.path.join(self.args.features_folder, file_base_name),
                    item["features"],
                )
                np.save(
                    os.path.join(self.args.features_folder, info_file_base_name),
                    tmp_dict,
                )

    def execute(self):
        if self.args.mode == "convert":
            self.convert()

After Change


                file_base_name = str(img_id) + ".npy"

                path = os.path.join(self.args.features_folder, file_base_name)
                if PathManager.exists(path):
                    continue
                info_path = os.path.join(self.args.features_folder, info_file_base_name)
                base_path = "/".join(path.split("/")[:-1])
                PathManager.mkdirs(base_path)
                np.save(PathManager.open(path, "wb"), item["features"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/pythia
Commit Name: f22814f2405f83179c99f1fd4b895671bbdb124c
Time: 2021-02-24
Author: asg@fb.com
File Name: tools/scripts/features/lmdb_conversion.py
Class Name: LMDBConversion
Method Name: extract


Project Name: mil-tokyo/webdnn
Commit Name: 2e49a9c0c5beae53787aaf2c87c85f5d0412e867
Time: 2017-06-19
Author: y.kikura@gmail.com
File Name: example/resnet/convert_resnet_keras.py
Class Name:
Method Name: main


Project Name: moskomule/senet.pytorch
Commit Name: 60f86864a6da5a746f9ae51f73ccfdeb29e6b35f
Time: 2018-03-06
Author: hataya@keio.jp
File Name: utils.py
Class Name: Trainer
Method Name: save