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
Add feature-extraction AlexNet #363
Conversation
b9c1e8f
to
66e08ea
Compare
Everything seems to work fine now. I trained the final layer for 5 epochs and achieved an accuracy of ~70% on the test set which is good enough for a fine-grained classification dataset such as ours. |
Awesome! |
I feel a little strange. |
The previous example was just to showcase the loading of pretrained parameters and could be used to run inference on images as per ImageNet categories. This example feature-extracts AlexNet for non-trivial data-sets. So as such, there was no use-case of the previous example. |
…orch into feature-extraction
I wrote a PyTorch like dataset-abstraction for better loading of data but I doubt that would be of any use now. |
I don't care about the dataload abstraction in this example. |
Thanks for this contribution @SurajK7 . Just two minor requests, would like to merge this:
Optional but would be nice - is there no way to avoid having to use both C++ and Python handle the serialization stuff? Would be nice if it could just be one Python script. |
I think it would be better if we could move the extracted parameters here. |
Thanks for adding the code @SurajK7 . Move the serialized data artifact you mean? We're trying to keep artifacts/binaries out of the repo if at all possible. |
@SurajK7 also I think if you merge master into your branch that might clear the last CI issue you have. |
@austinvhuang, I meant we can go ahead with the quoted suggestion. |
@SurajK7 - I created a release for the artifact in this repo - https://github.com/hasktorch/hasktorch-artifacts/releases/tag/alexnet See if it works to use this link instead https://github.com/hasktorch/hasktorch-artifacts/releases/download/alexnet/alexNet.pt |
Thanks! |
@austinvhuang |
For now, I have used lists for data-loading so the implementation is slow and not memory efficient(~19 GB footprint).
The model achieves ~80% training accuracy after 5000 iterations but validation accuracy seems rather dismal, I will try to figure what's going wrong.
Meanwhile, any suggestions or feedback would be greatly appreciated!