SlideShare a Scribd company logo
1 of 1
Download to read offline
blem 2) [Python] Gradient descent learning in Python: a) Create class NeuralNetwork () : that
creates a single neuron with a linear activation, train it using gradient descent learning. This class
should have the following function: i. def _init_(self, learning_r): that initializes a 31 weight vector
randomly and initializes the learning rate to learning_r. Also, it creates a history variable that saves
the weights and the training cost after each epoch (i.e., iteration). ii. def sigmoid(self, x ): that takes
an input x, and applies the sigmoid function to return: (x)=1+ex1 iii. def forward_propagation(self,
inputs): that performs forward propagation by multiplying the inputs by the neuron weights, uses
sigmoid activation function and then generates the output. iv. def train(self, inputs_train,
labels_train, num_train_iterations): that performs the gradient descent learning rule for
num_train_iterations times using the inputs and labels.

More Related Content

Similar to blem 2 Python Gradient descent learning in Python a Cre.pdf

Python library
Python libraryPython library
Python libraryToniyaP1
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfenodani2008
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetAmazon Web Services
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsKuntal Bhowmick
 
Introduction to Python - Part Three
Introduction to Python - Part ThreeIntroduction to Python - Part Three
Introduction to Python - Part Threeamiable_indian
 
Matching networks for one shot learning
Matching networks for one shot learningMatching networks for one shot learning
Matching networks for one shot learningKazuki Fujikawa
 
Hybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskitHybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskitVijayananda Mohire
 
Artificial Neural Network for machine learning
Artificial Neural Network for machine learningArtificial Neural Network for machine learning
Artificial Neural Network for machine learning2303oyxxxjdeepak
 
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...AILABS Academy
 
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)Thomas Fan
 
ECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comledlang1
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxRuby Shrestha
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsKuntal Bhowmick
 
Machine Learning Algorithms
Machine Learning AlgorithmsMachine Learning Algorithms
Machine Learning AlgorithmsHichem Felouat
 
ECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.comECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.comGVlaxmi7
 

Similar to blem 2 Python Gradient descent learning in Python a Cre.pdf (20)

Python library
Python libraryPython library
Python library
 
Naïve Bayes.pptx
Naïve Bayes.pptxNaïve Bayes.pptx
Naïve Bayes.pptx
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdf
 
Scalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNetScalable Deep Learning Using Apache MXNet
Scalable Deep Learning Using Apache MXNet
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
 
Introduction to Python - Part Three
Introduction to Python - Part ThreeIntroduction to Python - Part Three
Introduction to Python - Part Three
 
Advanced oops concept using asp
Advanced oops concept using aspAdvanced oops concept using asp
Advanced oops concept using asp
 
Matching networks for one shot learning
Matching networks for one shot learningMatching networks for one shot learning
Matching networks for one shot learning
 
Hybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskitHybrid quantum classical neural networks with pytorch and qiskit
Hybrid quantum classical neural networks with pytorch and qiskit
 
Artificial Neural Network for machine learning
Artificial Neural Network for machine learningArtificial Neural Network for machine learning
Artificial Neural Network for machine learning
 
Python3
Python3Python3
Python3
 
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
AILABS - Lecture Series - Is AI the New Electricity? Topic:- Classification a...
 
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
Pydata DC 2018 (Skorch - A Union of Scikit-learn and PyTorch)
 
ECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.comECET 370 Success Begins/Newtonhelp.com
ECET 370 Success Begins/Newtonhelp.com
 
C sharp chap6
C sharp chap6C sharp chap6
C sharp chap6
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptx
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
 
Python programming : Threads
Python programming : ThreadsPython programming : Threads
Python programming : Threads
 
Machine Learning Algorithms
Machine Learning AlgorithmsMachine Learning Algorithms
Machine Learning Algorithms
 
ECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.comECET 370 HELPS Redefined Education--ecet370helps.com
ECET 370 HELPS Redefined Education--ecet370helps.com
 

More from advaith20071

Briefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdfBriefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdfadvaith20071
 
Briefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdfBriefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdfadvaith20071
 
Briefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdfBriefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdfadvaith20071
 
Brief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdfBrief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdfadvaith20071
 
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdfBrezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdfadvaith20071
 
Breve historial del paciente La Sra J es una vctima de un.pdf
Breve historial del paciente  La Sra J es una vctima de un.pdfBreve historial del paciente  La Sra J es una vctima de un.pdf
Breve historial del paciente La Sra J es una vctima de un.pdfadvaith20071
 
Brecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdfBrecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdfadvaith20071
 
Breastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdfBreastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdfadvaith20071
 
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdfBreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdfadvaith20071
 
Brain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdfBrain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdfadvaith20071
 
Brain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdfBrain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdfadvaith20071
 
Brain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdfBrain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdfadvaith20071
 
Both PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdfBoth PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdfadvaith20071
 
Borner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdfBorner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdfadvaith20071
 
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdfBONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdfadvaith20071
 
Bones and Bone Tissue Study Guide Describe the gross anato.pdf
Bones and Bone Tissue Study Guide  Describe the gross anato.pdfBones and Bone Tissue Study Guide  Describe the gross anato.pdf
Bones and Bone Tissue Study Guide Describe the gross anato.pdfadvaith20071
 
Bonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdfBonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdfadvaith20071
 
Bones and Bone Tissues Study Guide Explain the chemical co.pdf
Bones and Bone Tissues Study Guide  Explain the chemical co.pdfBones and Bone Tissues Study Guide  Explain the chemical co.pdf
Bones and Bone Tissues Study Guide Explain the chemical co.pdfadvaith20071
 
Bond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdfBond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdfadvaith20071
 
Bombas Creating Socks with a purpose case study marketin.pdf
Bombas Creating Socks with a purpose case study  marketin.pdfBombas Creating Socks with a purpose case study  marketin.pdf
Bombas Creating Socks with a purpose case study marketin.pdfadvaith20071
 

More from advaith20071 (20)

Briefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdfBriefly summarize the categories of the ISPs as discussed in.pdf
Briefly summarize the categories of the ISPs as discussed in.pdf
 
Briefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdfBriefly summarize each of the 12 principles of the Agile Man.pdf
Briefly summarize each of the 12 principles of the Agile Man.pdf
 
Briefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdfBriefly describe how this conditiondiagnosis is affected by.pdf
Briefly describe how this conditiondiagnosis is affected by.pdf
 
Brief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdfBrief history and description of Guyana Early Childhood Educ.pdf
Brief history and description of Guyana Early Childhood Educ.pdf
 
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdfBrezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
Brezilya ili in Kolombiya ek Cumhuriyeti Msr Yunanis.pdf
 
Breve historial del paciente La Sra J es una vctima de un.pdf
Breve historial del paciente  La Sra J es una vctima de un.pdfBreve historial del paciente  La Sra J es una vctima de un.pdf
Breve historial del paciente La Sra J es una vctima de un.pdf
 
Brecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdfBrecha interpersonal se trata de las intenciones de un indi.pdf
Brecha interpersonal se trata de las intenciones de un indi.pdf
 
Breastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdfBreastfeeding provides many benefits From the following lis.pdf
Breastfeeding provides many benefits From the following lis.pdf
 
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdfBreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
BreadTalk Grubu BreadTalk iin stratejisini formle ederken.pdf
 
Brain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdfBrain Stem 36 List the three regions of the brain stem 37.pdf
Brain Stem 36 List the three regions of the brain stem 37.pdf
 
Brain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdfBrain Development 1 tist the four regions of the brain 2 .pdf
Brain Development 1 tist the four regions of the brain 2 .pdf
 
Brain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdfBrain circuit for scratching We have cells 1 Output cell i.pdf
Brain circuit for scratching We have cells 1 Output cell i.pdf
 
Both PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdfBoth PI 3Kinase and phospholipase C relay signals by modify.pdf
Both PI 3Kinase and phospholipase C relay signals by modify.pdf
 
Borner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdfBorner Communications articles of incorporation authorized .pdf
Borner Communications articles of incorporation authorized .pdf
 
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdfBONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
BONUS 14 pts 7 pts ea A certain piece of equipment that j.pdf
 
Bones and Bone Tissue Study Guide Describe the gross anato.pdf
Bones and Bone Tissue Study Guide  Describe the gross anato.pdfBones and Bone Tissue Study Guide  Describe the gross anato.pdf
Bones and Bone Tissue Study Guide Describe the gross anato.pdf
 
Bonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdfBonita Company tena un inventario final a precios de fin de.pdf
Bonita Company tena un inventario final a precios de fin de.pdf
 
Bones and Bone Tissues Study Guide Explain the chemical co.pdf
Bones and Bone Tissues Study Guide  Explain the chemical co.pdfBones and Bone Tissues Study Guide  Explain the chemical co.pdf
Bones and Bone Tissues Study Guide Explain the chemical co.pdf
 
Bond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdfBond valuation Hamilton Inc bonds have a coupon rate of .pdf
Bond valuation Hamilton Inc bonds have a coupon rate of .pdf
 
Bombas Creating Socks with a purpose case study marketin.pdf
Bombas Creating Socks with a purpose case study  marketin.pdfBombas Creating Socks with a purpose case study  marketin.pdf
Bombas Creating Socks with a purpose case study marketin.pdf
 

Recently uploaded

demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscapingDr. M. Kumaresan Hort.
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsISCOPE Publication
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhleson0603
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 

Recently uploaded (20)

demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscaping
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS Publications
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 

blem 2 Python Gradient descent learning in Python a Cre.pdf

  • 1. blem 2) [Python] Gradient descent learning in Python: a) Create class NeuralNetwork () : that creates a single neuron with a linear activation, train it using gradient descent learning. This class should have the following function: i. def _init_(self, learning_r): that initializes a 31 weight vector randomly and initializes the learning rate to learning_r. Also, it creates a history variable that saves the weights and the training cost after each epoch (i.e., iteration). ii. def sigmoid(self, x ): that takes an input x, and applies the sigmoid function to return: (x)=1+ex1 iii. def forward_propagation(self, inputs): that performs forward propagation by multiplying the inputs by the neuron weights, uses sigmoid activation function and then generates the output. iv. def train(self, inputs_train, labels_train, num_train_iterations): that performs the gradient descent learning rule for num_train_iterations times using the inputs and labels.