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

Transfer learning y convolucional #2

Merged
merged 5 commits into from
Jun 19, 2022
Merged

Transfer learning y convolucional #2

merged 5 commits into from
Jun 19, 2022

Conversation

nPironio
Copy link
Owner

No description provided.

nico and others added 3 commits June 6, 2022 19:25
@nPironio nPironio requested a review from CatOfTheCannals June 15, 2022 22:31
# Conflicts:
#	notebooks/model_training.ipynb
#	src/catdog/catdog/dataset.py
#	src/catdog/catdog/models/base.py

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/"):
Copy link
Collaborator

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

Copy link
Owner Author

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])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

esto no es hardcode??

Copy link
Collaborator

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

Copy link
Owner Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

de acuerdo

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)
Copy link
Collaborator

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

Copy link
Owner Author

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.

@nPironio nPironio merged commit f8d0787 into main Jun 19, 2022
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

Successfully merging this pull request may close these issues.

2 participants