Base class for models
See original GitHub issue🚀 The feature
Introduce a base class for all TorchVision models. The base class defines common interfaces and attributes.
Motivation, pitch
We can track the model instantiation similar to dataset instantiation.
We can also define a reset_parameters
interface to address #3410.
Alternatives
Adding logging and reset_parameters
to each of the models manually. The approach is not future proof, we might forget to do that for new models.
Additional context
No response
cc @datumbox
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Create a Model Base Class | egghead.io
Here we have a mock model that's going to use our base class. It's the most basic model we could possibly write at...
Read more >Models - Django documentation
Each model is a Python class that subclasses django.db.models.Model . Each attribute of the model represents a database field. With all of this, ......
Read more >c# - Having models which inherit from one base model
I'm aware that composition is always considered a best practice. public class BaseServiceResponse { #region Properties public Guid PatientId { ...
Read more >Base Class: Model Provider Class - SAP Help Portal
Base Class : Model Provider Class Locate this document in the navigation ... OData artifacts which are created for a model in SEGW...
Read more >c# - How do I use base classes across my view models and ...
Generally you wouldn't need to cast from a base class to a derived class. That only works if the object is definitely of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let’s close this issue for now until we find strong enough feature set to be added to a generic top-level class.
@kazhang Thanks for the clarifications. Agreed.
Good idea, worth discussing.
Since there seems that there is not enough generic functionalities to be shared across models and there is agreement to avoid introducing unnecessary complexity, does it mean we can close the issue?