-
Notifications
You must be signed in to change notification settings - Fork 86
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
Implementation of Tests? #57
Comments
I agree, if we have a models library(like keras.models) with and without pretrained weights then transfer learning will also become easier to implement. If you need any help, I'll be happy to help. |
Great, If this is something that is worth implementing we can split up the task, I think I have a clear idea of implementation and it would end up requiring 3 changes and we could split them up so that we can get more done. |
Good idea, I guess any easy way to test the models is to provide predefined weights for each model, let them train for a number of iterations and see if they return the correct results |
I think this ties into the more general question of how to structure this repository, because as it stands it isn't as nice and clean as our other repositories. In my opinion, we should decide on a clear file heirarchy before we continue. Doesn't this also mean we should also change VAE? Also, for the Kaggle folder, we have "examples" instead of these extensible "models", so maybe we should be making an examples folder for cases like that? Maybe we could have the .cpp files for the models in "examples"? |
I completely agree, I wanted to implement the following changes (For at least all the models that I add).
Why it might be useful:
This is also the API (Basic) that I was taking about in my GSOC proposal for ANN Algorithms on the mailing list. |
You've pretty much read my mind as to the structure of the codebase. This would mean some restructuring of the code already on the repo, but I don't see any problem with this. |
Great, This should be fun to work on. @zoq, what do you think? |
I was also imagining it like this @kartikdutt18 , I would love to help in this. I'll also add some new models like LeNet and VGG. |
A unified interface would be useful, that said I also don't want to introduce too much boilerplate code, I see the code as a neat way to show some real-world examples; so not sure if Also, I think it would be useful if we use the CLI implementation from mlpack, this would bring us one step further to use the bindings framework, so support for python, Julia, etc.
Sounds good, so I guess, I could just provide a dataset name and it would return the necessary data structures?
Not sure what that means, I think each model could serve as an example?
Sounds good.
Yes, we can do that.
Right, same as for data this can be stored at some location. |
What I was thinking for the examples folder is a set of programs that a user could run directly, using the models defined in the header files. This is also better in cases like the digit recognizer, where I don't see the point of making a model - it just serves as a popular basic example. |
Agreed, It would be much cleaner and simpler that way.
Yes, the user could provide name of supported dataset (like mnist) or path to his own dataset (ReadME would have structure in which csv should be in).
What I had in mind was, that in examples folder we could have code for problems such as time series, object detection etc. A user would use CLI to specify model name, path to dataset or name of dataset (that model repo supports) and other parameters and it would run training and validation on it. Internally it would have all models included. ( |
@prince776, That would be great. There is PR open for VGG already. I think there should be one PR to restructure (for now) otherwise we might end up having different style of implemented models and data-loaders, I think once I open the PR and the basic structure is approved you can modify the code into that structure and we could also add them to the repo. Till then a good way to start might be implementing and testing the model locally. For restructuring, There is a lot that needs to be done so I'll tag you in the PR and things that would run better parallelly could be done by both of us or some more contributors. I think we will figure it out. |
Ok sure. There are a lot of things I want to do, fell a little back due to exams but it's ok. |
I am in a similar situation right now. |
I think the advantage of the current approach is that we can build each model independently, so if a user is only interested in a specific model there is no need to build everything else, which might come with some extra dependencies like opencv that are just not needed. But I think we could do both, but start with one? |
No worries, best of luck with you exams. |
Agreed, This was also discussed in Video meetup yesterday, some other points that were mentioned are:
I'll start with one thing and take it from there. I think this would be great. |
Sounds good, I think it's easier to discuss changes if we have a minimal example. |
Hi everyone I changed the DigitRecognizerCNN a bit to support LeNet1, LeNet4 and LeNet5. Here are some intial results for LeNet 4(Ran this on my local machine, will run more epochs on my college workstation.)
I haven't added comments and there are some style issues. Once I fix them, I hope to open a PR for this issue tomorrow. Also in the new script (without comments), it takes only 10 lines to train and test a model. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍 |
Keep Open (At least till mlpack/models#3 is merged). |
Tests have been implemented in models repo. Thanks everyone for all the help! |
Hi everyone, This is in reference to PR #50, if models are added as libraries rather than cpp file so that they can be included in other cpp files, Rather than testing only on the system of the person who created the PR, does it makes sense to add a single pass on given dataset?
Another test would be loading of weights for the given model.
I am not sure if this needed but I think if changes are made in mlpack that might affect models here, a testing unit can help make the changes.
This will also prevent addition of models that have bugs. In the long run, this might also streamline addition of models.
I would love to hear your opinion.
Thanks.
The text was updated successfully, but these errors were encountered: