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

How to use my own data set to classify? #6

Closed
xiejen opened this issue Apr 10, 2024 · 6 comments
Closed

How to use my own data set to classify? #6

xiejen opened this issue Apr 10, 2024 · 6 comments

Comments

@xiejen
Copy link

xiejen commented Apr 10, 2024

How to apply this code to classify using my own dataset?
I can't see how the model is trained and saved.

@AlbertChen1991
Copy link
Collaborator

Thanks for your feedback. You need to first generate data augmentations using code in the "paraphrase" folder. Then you can generate training, validation and test dataset using code in the "utils" folder.

@xiejen
Copy link
Author

xiejen commented Apr 12, 2024

Thank you so much.
There is no code like the following in the project, so it is hard for me to figure out after saving the trained model, how to do the prediction. I can't figure out how to load the input tensor and how to call the model to do the prediction. Please help. thanks.
y_pred = model(x)

@xiejen
Copy link
Author

xiejen commented Apr 15, 2024

Does this mean to predict the label, it will need both the input test data and the support data?
y_pred = self.pred_proto(z_query, z_support_proto) y_pred1 = self.pred_KNN(z_query, z_support, support_inds.reshape(-1), k=1)
Is it possible to save the trained model and use y_pred = model(x)?
Thinking in its application after the model is trained, it won't be practical to require the support data when used for prediction.

@AlbertChen1991
Copy link
Collaborator

You can't predict using y_pred = model(x) because this model is applied in meta-learning. That means you must prepare a support set for prediction.

@happynewsday
Copy link

How to apply this code to classify using my own dataset? I can't see how the model is trained and saved.

Hello, do you have the code for contrastNet? Could you share it with me?

@AlbertChen1991
Copy link
Collaborator

How to apply this code to classify using my own dataset? I can't see how the model is trained and saved.

Hello, do you have the code for contrastNet? Could you share it with me?

Please see the "master" branch.

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

3 participants