facebookresearch / open_lth

A repository in preparation for open-sourcing lottery ticket hypothesis code.
MIT License
626 stars 112 forks source link

desc | bugfix def_ph not defined #15

Open Vulwsztyn opened 3 years ago

Vulwsztyn commented 3 years ago

        if pruning_strategy:
            pruning_hparams = ...
            if defaults and defaults.pruning_hparams.pruning_strategy == pruning_strategy:
                def_ph = defaults.pruning_hparams
        else:
            def_ph = None
            pruning_hparams = ...
        pruning_hparams.add_args(parser, defaults=def_ph if defaults else None)

this piece of code allowed def_ph not to be defined in the last line