just in case if code isn't working well #S1 MAKE MODEL class MeraModel(nn.Module): def __init__(self,x_train): super().__init__() self.linear = nn.Linear(x_train.shape[1],1) self.sigmoid = nn.Sigmoid() def forward(self,x_train): out = self.linear(x_train) out = self.sigmoid(out) return out #S1.A MAKE IT'S OBJECT obj = MeraModel(x_train_tensor) #S2 MAKE FIXED TUNER epochs = 50 lr = 0.01 #S3 MAKE ERROR FUNC. loss_fn = nn.BCELoss() #S4 MAKE OPTIMIZER optim = torch.optim.SGD(obj.parameters(),lr) ## S5 TRAINING for i in range(epochs): #forward pass y_pred = obj(x_train_tensor) #==> obj.forward(x_train_tensor) #loss calculation loss = loss_fn(y_pred,y_train_tensor.view(-1,1)) # y_pred (455,1) hoga but y_train ka shape (455,) dikhega uske liye y_train ko same kia .view(-1,1) #zero the prev grads optim.zero_grad() #backprop loss.backward() #update params (wts,bias) optim.step() # print loss in each epoch print(f'Epoch: {i + 1} | Loss: {loss.item()}') print(' ') #S6 EVALUATION with torch.no_grad(): y_pred = model.forward(x_test_tensor) y_pred = (y_pred > 0.5).float() accuracy = (y_pred == y_test_tensor).float().mean() print(f'Accuracy: {accuracy.item()}') >.
Guruji namaste. superb. I am going to so deep in pytorch. I think next module to lrean about torch.utils.data, torch.jit, torch.distributed, torch.cuda..........etc.Exciting....waiting for next videos on pytorch.
I have one request to you, Now a day most of the companies are focusing on RAG based application and LLM fine-tuning. that involves langchain, vector database etc.
Sir, appreciating your efforts!! could you please off the AI assistant while shooting the video in google colab sometime it becomes problematic to track your code and colabs' suggestion
Thank you so much for this video. A query: Is torched.no_grad() a replacement for torch.inference_mode()? Ye bhi to inferencing ke hi kaam ata hai. Or is it that they serve different purposes.
Hi sir, Can you please make a video to deploy and train a sagemaker based keras tensorflow model but on like numerical data not image data say for example classifying weather a person has diabetes or not based on some given feature. I have searched whole youtube but couldnt find a video on it. All tensorflow videos are only for image data none for numerical data. And great work by the way.
Sir me jupiter notebook me ek project krra tha jisme user input lete he but kuch numbers he jinko type krne pr vo chl nhi rha 1,2,3,4,5,6 ye numbers type krne pr chl nhi rha sir please help me.keybord sahi he sb sahi he but ye kuch prblm hora he sir please reply.
Sir firstly i am very thankful to you for this amazing playlist. I want to clear my one confusion Is it necessary using class? Can we solve it without making class if yes than what's the difference between both?
Sir I just love the pace you are releasing videos. It's like food for me.. getting proper nutrition now❤❤
jinxed
simplicity in teaching is rare thanks for being here , more appreciation to you ! :)
just in case if code isn't working well
#S1 MAKE MODEL
class MeraModel(nn.Module):
def __init__(self,x_train):
super().__init__()
self.linear = nn.Linear(x_train.shape[1],1)
self.sigmoid = nn.Sigmoid()
def forward(self,x_train):
out = self.linear(x_train)
out = self.sigmoid(out)
return out
#S1.A MAKE IT'S OBJECT
obj = MeraModel(x_train_tensor)
#S2 MAKE FIXED TUNER
epochs = 50
lr = 0.01
#S3 MAKE ERROR FUNC.
loss_fn = nn.BCELoss()
#S4 MAKE OPTIMIZER
optim = torch.optim.SGD(obj.parameters(),lr)
## S5 TRAINING
for i in range(epochs):
#forward pass
y_pred = obj(x_train_tensor) #==> obj.forward(x_train_tensor)
#loss calculation
loss = loss_fn(y_pred,y_train_tensor.view(-1,1)) # y_pred (455,1) hoga but y_train ka shape (455,) dikhega uske liye y_train ko same kia .view(-1,1)
#zero the prev grads
optim.zero_grad()
#backprop
loss.backward()
#update params (wts,bias)
optim.step()
# print loss in each epoch
print(f'Epoch: {i + 1} | Loss: {loss.item()}')
print('
')
#S6 EVALUATION
with torch.no_grad():
y_pred = model.forward(x_test_tensor)
y_pred = (y_pred > 0.5).float()
accuracy = (y_pred == y_test_tensor).float().mean()
print(f'Accuracy: {accuracy.item()}')
>.
Wishing you abundant happiness for sharing your valuable time and knowledge with us.
With love from Pakistan.
Our Hero and Icon of Teaching.I am from Bangladesh and Love you brother.
Guruji namaste. superb. I am going to so deep in pytorch. I think next module to lrean about torch.utils.data, torch.jit, torch.distributed, torch.cuda..........etc.Exciting....waiting for next videos on pytorch.
Loved the way you explained. Thank you..!
Sir, Literally I am big fan of the way you teach us. and i can say your contents are best on the youtube except some standford course.
Thank you sir, for making pytorch that easy to understand
Thank you so much sir for such amazing content.
I am very excited for this playlist....
loving this channel
Most awaiting series 🎉🎉🎉
Yup great brother just release all others as soon as possible
Sir iss saal hi 3lakh kar ke manenge❤
I have one request to you, Now a day most of the companies are focusing on RAG based application and LLM fine-tuning. that involves langchain, vector database etc.
bhaiya you are killing it
Sir, appreciating your efforts!! could you please off the AI assistant while shooting the video in google colab sometime it becomes problematic to track your code and colabs' suggestion
Great one
Where is next video complete this Playlist as soon as possible 😊😊
Picking up good pace in uploading . If same pace is maintained it will be really great . Thank you
🔥🔥🔥💥💥
Sir Pls continue the deep learning playlist too
Sir Pytorch Next Video ?
SIR please post pytorch videos regularly
Thank you so much for this video. A query: Is torched.no_grad() a replacement for torch.inference_mode()?
Ye bhi to inferencing ke hi kaam ata hai. Or is it that they serve different purposes.
Sir please suggest some good paid courses for gen ai and llm college placements are going on really need it
Sir, can you please make a lecture video on "Langchain" , "llama-index" and "RAG"
Great Video
Sir please make a video in which we scrap a website which have load more button and when we scroll down items load for machine learning data gathering
Can I know what is the software u are using to teach and write?
Microsoft OneNote
Make a video on how to scrap dynamic website for data gathering perpose
Sir pls add video 5 in the video title.. it will be easier to navigate for students who'll watch later!
Hi sir,
Can you please make a video to deploy and train a sagemaker based keras tensorflow model but on like numerical data not image data say for example classifying weather a person has diabetes or not based on some given feature. I have searched whole youtube but couldnt find a video on it. All tensorflow videos are only for image data none for numerical data.
And great work by the way.
Hey sir, should I study ml models with doing some projects or before, what's the best way?
Sir Please Build a transformer using pytorch
Best!
I LOVE U sir
Sir me jupiter notebook me ek project krra tha jisme user input lete he but kuch numbers he jinko type krne pr vo chl nhi rha 1,2,3,4,5,6 ye numbers type krne pr chl nhi rha sir please help me.keybord sahi he sb sahi he but ye kuch prblm hora he sir please reply.
going on right pace, ezzz noobs ... :)
SIr is always ignoring google colab suggestions😇😇😇
Sir firstly i am very thankful to you for this amazing playlist.
I want to clear my one confusion Is it necessary using class?
Can we solve it without making class if yes than what's the difference between both?
Any one other if know can reason me
Kafirr se padh rha hai tu smjhaaa tere nabi ka baap bhi kafiirr hi tha smjha मुल्ले jihaadi