Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent use of the term 'model' #552

Closed
louisfh opened this issue Sep 20, 2022 · 2 comments
Closed

Inconsistent use of the term 'model' #552

louisfh opened this issue Sep 20, 2022 · 2 comments
Assignees
Milestone

Comments

@louisfh
Copy link
Member

louisfh commented Sep 20, 2022

It is confusing how we use the term model. In our tutorials we show instantiating a model by e.g.

from opensoundscape.torch.models.cnn import CNN
model = CNN('resnet18',classes=classes,sample_duration=2.0,single_target=True)

But sometimes in the codebase we use model to refer to something else. e.g. modify_resnet in opensoundscape.torch.architectures.cnn_architectures takes a model argument, which would actually be model.network using the object instantiated above. We should decide on consistent terminology.

def modify_resnet(model, num_classes, num_channels)
"""modify input and output shape of a resnet architecture"""
....
@sammlapp
Copy link
Collaborator

I wanted to use the term "model" for opensoundscape.torch.models.cnn.CNN and similar, ie OpenSoundscape's classes, rather than CNN.network which I refer to as "architecture" as much as possible (so in your above example, model should be 'architecture'). However, this conflicts with PyTorch's use of the word model for the objects we call "architectures", so you could argue that we should follow that convention and call opso classes like CNN something else.

@sammlapp sammlapp added this to the 0.8.0 milestone Sep 26, 2022
@sammlapp sammlapp added the discuss Long term ideas to consider label Oct 4, 2022
@sammlapp
Copy link
Collaborator

sammlapp commented Oct 4, 2022

Let's use "model" for opso CNN class and similar, and use "architecture" for pytorch resnet18 and similar.

louisfh added a commit that referenced this issue Nov 7, 2022
Some references to 'model' objects in the codebase were actually referring to
model.network objects.
This commit replaces all the instances where the
codebase used the term model (when actually needing model.network)
with the term 'architecture'.
@louisfh louisfh added the resolved_in_branch The issue has been resolved in a feat/issue branch but not merged into develop label Nov 8, 2022
sammlapp added a commit that referenced this issue Dec 20, 2022
@sammlapp sammlapp added resolved_in_develop The issue has been resolved in the develop branch but not in master and removed discuss Long term ideas to consider resolved_in_branch The issue has been resolved in a feat/issue branch but not merged into develop labels Dec 20, 2022
@sammlapp sammlapp removed the resolved_in_develop The issue has been resolved in the develop branch but not in master label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants