question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kazhangcommented, Oct 12, 2021

Let’s close this issue for now until we find strong enough feature set to be added to a generic top-level class.

0reactions
datumboxcommented, Oct 12, 2021

@kazhang Thanks for the clarifications. Agreed.

I open this issue to gather generic functionalities that should be applied to all models.

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found