-
Notifications
You must be signed in to change notification settings - Fork 0
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
Transfer learning y convolucional #2
Conversation
Change convolutional architecture
… base class. Implement transfer learning
# Conflicts: # notebooks/model_training.ipynb # src/catdog/catdog/dataset.py # src/catdog/catdog/models/base.py
src/catdog/catdog/dataset.py
Outdated
|
||
from definitions import IMG_PATH | ||
|
||
|
||
|
||
class CatDogDataset(Dataset): | ||
def __init__(self, cat_dog_df, transforms=None, img_output_size=(500,500)): | ||
def __init__(self, cat_dog_df, transformations=None, feature_scaling=255, img_output_size=(500, 500), img_path="../data/images/"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
img_path hardcodeado lo queres ahi?? yo lo habia reemplazado por definitions.IMG_PATH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, debí mirar con poco amor al hacer el merge del archivo con main. Corrijo en próximo commit.
self.resizer = transforms.Resize(img_output_size) | ||
|
||
self.to_tensor = transforms.ToTensor() | ||
self.normalizer = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esto no es hardcode??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahi vi que se usa eso como estandar de pytorch. lo queremos usar para todos nuestros modelos, aun los que no fueron pre entrenados??
pytorch/vision#1439
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactamente por eso lo puse. Osea sí, mucho no me lo cuestioné. Podemos calcular esos valores con nuestro dataset y reemplazarlos, pero no me calienta mucho diría.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
de acuerdo
src/catdog/catdog/dataset.py
Outdated
if self.transforms is not None: | ||
np_img, bbox = self.transforms(np_img, bbox) | ||
if self.transformations is not None: | ||
np_img, bbox = self.transformations(img, bbox) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aca tal vez queremos renombrar np_img??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De hecho sí, es un bug. Corrijo en próximo commit.
No description provided.