General course chat

Hi, yeah I am doing that - I train first on 128x128, then 256x256 and then on 1024x1024 but I wanted to know whether it is advantageous to train on rectangular vs square images. Welcome to the forum btw :slight_smile:

Thank you!! Thats behion my real experiance, so i would follow this post, :slight_smile:
But my feeling says a square will be better if any ,

Hey guys, great to find this community!

I am using fast.AI for sales predictions and wondering if others have met the following questions as I do:

1 the model run usually is pretty good in the first few epochs, but towards the very end, I usually see the metrics exploded at the last epoch. Is there a way to stop the epoch during training and store the model if the metrics during last epoch met some threshold?

2 Across epochs, my train_loss is usually much higher than val_loss (~2X mostly). What are some levers that I could play with to solve the underfitting problem and hopefully reach a better model?

code below. Thanks guys!

learn = tabular_learner(data, layers = [400,200,40], ps= [0.8,0.8,0.8], emb_drop =0.2,
y_range = y_range, metrics = [exp_rmspe, mean_absolute_error])

learn.fit_one_cycle(8,1e-3,wd=0.01)

part 2 has started? I have seen few discussion groups on it.

I am currently using Google Colab. When I am fitting the Resnet34 model as shown by @jeremy in the first lecture it takes me a total time of 8+ mins in Google Colab. (I have enabled GPU in colab). While it only takes something under 2 mins for @jeremy. Can anyone please tell me why does it take so long in Google Colab? I think the code is not using the GPU.

See this thread for more info on why this maybe the case. I think Colab uses the GPU but my personal theory is that its being shared amongst multiple colab notebooks (on top of the VM only having a possible CPU bottleneck as described in the thread linked.)

1 Like

It is the CPU, as now, the transforms are done in CPU, so if the batch size is large, the GPU is waiting for the CPU to send the transformed images. Disable transofrms, and re-test.

2 Likes

If you don’t mind, can you please explain how to disable transforms?

You probably don’t want to do that. It dependes, if you are using the method databunch.from_something, just pass None to ds_tfms arg.
with the datablock API, the transform step is optional.

1 Like

Ok I’m confused. I’ve downloaded the fast.ai stuff onto a machine, and have it working, I pull up the web browser and it shows me a directory of courses etc… So then I listen to lecture 1, and try and follow along in the matching note book, and it doesn’t match. The notebook is about cats vs dogs, the lecture is about dog breeds, maybe it’s in lesson1-breeds instead of lesson1. But hey ho I go onto lesson 2, now lesson 2 in the notebooks is only “lesson2-image_models.ipynb”, but in the talk it’s unrelated… So clearly I’ve got the wrong notebooks/lessons or something. Or a different version of the course… Can someone just tell me where I’ve gone wrong because this course is excellent but I’m hugely confused about why nothing matches… :slight_smile: Thanks!

Did you clone the right repository? you need to clone the coursev3 repo.

The one I cloned was: https://github.com/fastai/course-v3.git

1 Like

Thanks, no I was using the one that came with the main fast.ai repository, I didn’t realize I needed a different one for the course. Much appreciated.

1 Like

Thanks for the help man:)

Hey All,
Where do the edge values initially come from? As I undestand it, they are random and then become more useful via backprop. Is there a range that the random value has to be within? If someone knows where Jeremy goes more in depth about this I would love a lecture number and timestamp. Thanks!

i have a question in regards to AI, im new to this but i fail to see the point in having a single ai doing all the work.

i had an idea like this but i don’t know if it’s too far off into space

Multiple AI’s with very specific jobs to do, that works in harmony

  • AI 0: BIOS , Basic needs encoded into the AI, this BIOS will override all other functions, reasoning to achieve the need, Survival instinct. ( Such as more battery power )
  • AI 1: Suppression of unneeded information , prediction of consequences and actions , the judge between good and bad , right or wrong answer. Frontal Lobe.
  • AI 2: Assistance in interpretation of senses , as well as numbers and jobs , understanding of objects , Shapes , and space. Pariental Lobe.
  • AI 3: Perception Assist , interpretation of sound , plays a role in visual memory and objects. Temporal Lobe.
  • AI 4: Processing of senses and visual stimuli as well as information. Occipital Lobe.
  • AI 5: This AI plays a major role in Balance and movement as well as other motor skills, Cerebellum.
  • AI 6: Allows the Transfer of information , between the Finalized actions decided between the AI’s to the body, this AI also controls Automatic Functions. Brainstem.
  • AI 7: Fight or Flight

Reasoning behind this: The reasoning behind this, is because the human mind can have multiple personalities, so I don’t see why we don’t have multiple personalities acting in unity as 1 singular personality.

I fail to see again, and again, why only 1 AI is used FOR ALL OF THE WORK, which if frankly ridiculous and stupid, but works for simple things.

The idea: the idea is very simple.

Instead of having a single AI, doing all the work and possibly making errors maybe once in a while, you need to have other AI’s that specialize in that particular field to have the final say, and may add upon the information and or correct the mistakes made.

Hello people, I created a Flower Classifier web app. You can upload and classify the type of Flower. Currently, it can only classify 3 types of flower daisy, dandelion, rose, sunflower, tulip. Here is the Link https://github.com/lkit57a03/Fastai-flask-flower-deploy. Please use regular pip version to run the code(because I had not tested docker).

I was watching the video about building the image recognition heatmap from scratch, and got to wondering about the different parts of an image that a neural net finds important for making a decision on its classification. It seems like for misidentified images, the neural net might focus on a given part of the image that is actually less important. In order to improve predictions, could you essentially tell the neural network to focus on something else by zeroing out those pixels that were originally thought to be important and training again on that image? I’m just brainstorming some crazy ideas here and am not really technically to the point where I’m comfortable implementing that myself, but I’m curious if there is something fundamentally wrong with that line of thinking. Thanks!

1 Like

Very cool. It would also be great if you had the code where you train your model! I :heart: metrics.

Does anyone here know exactly how to post new questions here?

Hello folks…this a total newbie question… I’d like to know how to pick a learning rate from the LR plot below…actually I don’t understand, in a value like (5e-6), where do we get the value 5 before the (e) here ?!
Do we count the dashes after (e-6) on the LR axis?!
How do we pick values between lets say e-6 and e-5 ?!
lr_finder