I mean, you’re doing all those matrix operations, calculating the loss, getting the gradients, adjusting the weights etc. only for the network to learn to predict 0 for the OTHER class, regardless of what the inputs are.
I’d be very surprised if that class activates at all for any image. I haven’t tried this myself yet, but I’d like to know what happens practically.
My intuition says something like
d) [x, y, z] where x + y ~= 1.0 & z ~= 0.0
I’d guess c too - and with different values than 0.5 if the dog or snake training data had houses in the background (hopefully 0.9, 0.1, 0 - as I like my houses without snakes).
Let’s get it to 5 answers because I’m interested in the answer too
I’m guessing c with a small caveat.
(but more like ~some probability of it predicting OTHER ie; non zero)
My intuition says that since there is no “understanding”, the network may activate on things it has learned for the known categories and mistake the OTHER to be that.
@jeremy I implemented a python function reindex(dest, start_idx=0, ext = None) that takes a directory or directory of directories and uniquely reindexes all of the files across all directories. Optionally, a starting index and extension can be provided. Importantly, when it reindexes, it will save the non-numeric stem of the file name to the extent that was used for labeling. I plan to wrap it in a script so it can be used from either the shell or within Jupyter and post it on github.
If you have an issue in that you feel you are falling behind in your schedule then if you need to speed up that’s fine with me. What I note with V5 is that the lessons are much shorter in duration compared with previous version so I guess there is more pressure to get through all the material, perhaps Iam mistaken.
Please continue with your excellent work
So fastai lib will decide whether to use the GPU or not during training based on model size and/or dataset number of samples? I was going through the notebook of the 2nd chapter of the book and when training the bear classifier I noticed that nvidia-smi showed no activity on the GPU, even though I have a GPU available:
So I flushed my setup and used fastsetup this time, still nvidia-smi shows no process running on the GPU. Interestingly, nvtop does show memory usage while training the bear classifier.
yes… i tried watch nvidia-smi and no processes show up. As well, while looking at the help of nvidia-smi i saw you can probe in a loop using -l or --loop and tried that but same result, no processes.
Maybe it’s happening too fast? I’d try it with the imdb example in the first notebook with a large batch size (64) and run nvidia-smi -l to see if it hits the gpu or gpu ram? on a v100 it should take about 60-120 seconds per epoch IIRC … if it takes much much longer then it’s probably not hitting the GPU
I came up with a different solution, which was to create a new function python function reindex, which can be used to create unique pathnames across a set of directories.
reindex fixes this problem by uniquely reindexing all files within first-level directories of dest
It can be used from within python or from the shell. Here is how one would use it from the shell:
usage: reindex.py [-h] [--start_idx START_IDX] [--ext EXT] dest
Uniquely reindexes all files within first-level directories of `dest`
positional arguments:
dest Contains one or more directories
optional arguments:
-h, --help show this help message and exit
--start_idx START_IDX
Starting index across all files
--ext EXT Optional file extention
Ok, that’s a good point, maybe an epoch lasts less than 60 secs for the bear classifier, I’ll try your suggestion. Now, I am sure it is using the GPU as nvtop shows memory being used in the GPU the training, as I pointed out previously
[Edit]
I upgraded last week to Win 11 to get a WSL2 Ubuntu environment to use with this for this course. Win 11 allows Linux GUI apps to display seemlessly next to Windows Desktop apps.
Since VSCode and Codium are the same code base, they both give the following error when installed and run using “code .” at a WSL prompt.
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the code command in a WSL terminal just as you would in a normal command prompt.
So both seem hardcoded to operate only with Linux as a VS Code Server.