Visual-Behavior / aloception-oss

Aloception is a set of package for computer vision: aloscene, alodataset, alonet.
Other
93 stars 7 forks source link

Generic datamodule #322

Closed Dee61298 closed 1 year ago

Dee61298 commented 1 year ago

Introducing base classes for datamodules and train pipelines (inspired by BaseDataset class). @thibo73800

Same motivation, but for training pipelines. This time, the often-reused bits are the arguments again, the optimizers, the run functions, etc. When inheriting, the user needs to implement the model and the criterion. The user is of course free to write its own functions in the child class for more complex cases


This pull request includes

thibo73800 commented 1 year ago

I think @anhtu293 & @Data-Iab opinion are on this PR could be great to move on

anhtu293 commented 1 year ago

Very good idea ! @Dee61298 in base lightning module, you shouldnt redefine the flags which are already defined by lightning (https://pytorch-lightning.readthedocs.io/en/stable/common/trainer.html#trainer-flags)

Dee61298 commented 1 year ago

@anhtu293 do you mean these lines ? I copied it from another code but I'm guessing it was a mistake

        parser.add_argument(
            "--gradient_clip_val", type=float, default=0.1, help="Gradient clipping norm (Default: %(default)s)"
        )
        parser.add_argument(
            "--accumulate_grad_batches",
            type=int,
            default=4,
            help="Number of gradient accumulation steps (Default: %(default)s)",
        )
Dee61298 commented 1 year ago

Closing this because I made PR #341 without the formatting issues.