I am new to open source development, but would like to start with something small. I was reading through the code for lr_find and found a variable being passed to learn.fit, and it was named ahere. The variable is being passed as learn.fit's first parameter and that parameter is named as epochshere in the method definition. So, I thought it would be good to rename it in lr_find as well to epochs.
This I thought would be good chance to learn the process of submitting a PR. Let me know if its okay to submit a PR for this.
You can certainly do that.
Note that following the fastai style guide, we usually give very short names to variables that are used for a very short amount of time (here just one line), which is why its named a.
I am trying to figure out a way to add AdaptiveLogSoftmaxWithLoss as the last layer on a language model. I thought I had a way to get it to work with the callbacks but I feel like I am stuck, again.
I think the problem is from having the output and the loss tied up in the same function. The loss_batch() in basic_train.py seems to need for them to be separated. I thought I could use on_loss_begin to extract the tuple with (out,loss) from the final layer and then apply that loss. It also looked like I could use on_backward_begin(loss) to process the yb from that batch. But I still can’t quite pull it together.
Has anyone else looked at trying to add this layer? If so, any ideas/pointers?
I also realized, as I write this, that we could have our own AdaptiveLosSoftmax layer and a Loss that are not inter-connected. It would mean we loop twice rather than once, but might be cleaner to fit into the framework.
I am using Google Colab and installed the library using https://course.fast.ai/setup/colab
In the notebook lesson7-superres-gan.ipynb, following error is thrown while calling fit() on GANLearner:
Ok, I was stupid with my first fix, now it’s really fixed on master. @nandakumar212 fixed on master means you won’t have the fix in colab until the next release, unless you do a dev install.
I was running into issue while experimenting with object detection models. None of the methods Learner.predict, Learner.pred_batch, Learner.get_preds works. The one method that works is Learner.show_results. I saw a TODO by Jeremy back in December about refactoring the code there to work with pred_batch(reconstruct=True). The use of attaching RecordOnCPU callback to capture the input and target is also rather unintuitive to follow. Is there any new thinking/progress on this? (I have to admit, the library’s intricate design is powerful but also quite formidable for a newcomer to grok. Awesome work and kudos nevertheless!)
Yes, making object detection work end to end is on our TODO and will be done before the second part of the course begins, but it probably won’t fully work right now. I’d stick with calling the models explicitly for now, until we have sorted this out.
That looks very nice! It may be a bit specific to be included in fastai, but we can definitely link to it with other examples of custom ItemList or custom model definitions.