=0.3)

ax2.set_title("Loss over Time")

# Create a range of intefers from 0 to training_steps and plot the losses as a curve
ax2.plot(range(0, training_steps), losses)

ax2.set_ylabel("Loss")
ax2.set_xlabel("Training steps")

ax3.set_title("Slope over Time")
ax3.axis('equal')
ax3.axis([-15, 15, -15, 15])

for b, m, step in history:
  ax3.plot(line_x_range, [b + a * m for a in line_x_range], "g", alpha=0.2)

# This line seems to be superfluous removing it doesn't change the behaviour
plt.show()

A:

Ok so update_weights() is calling a minimizer on the loss that you defined to be the error between your prediction and the target. 
What it will do is it will add some small quantity to the weights (how small is controlled by the learning_rate parameter) to make your loss decrease and hence to make your predictions "truer".
This is what happens when you call update_weights() so after the call your weights have changed from a small value and if everything went according to the plan your loss value has decreased.
What you want is follow the evolution of your loss and the weights see for example if the loss is really decreasing (and your algorithm works) or if the weights are changing a lot or maybe to visualize them.
You can gain a lot of insights by visualizing how the loss is changing.
This is why you have to see the full history of the evolution of the parameters and loss; That is why you eval them at each step. 
The eval or run operation is different when you do it on the minimizer and on the parameters when you do it on the minimizer it will apply the minimizer to the weights when you do it on the weights it simply evaluates them.
I strongly advise you to read this website where the author explains far better than me what is going on and in more details.

 Q:

ngTagsInput "ngrepeat: dupes" and "Cannot read property'replace' of undefined"

I am attempting to use autocomplete inside ngTagsInput and I
= 0.3) 

 ax2.set_title("Loss over Time ") 

 # Create a range of intefers from 0 to training_steps and plot the losses as a curvature 
 ax2.plot(range(0, training_steps), personnel casualty) 

 ax2.set_ylabel("Loss ") 
 ax2.set_xlabel("Training steps ") 

 ax3.set_title("Slope over Time ") 
 ax3.axis('equal') 
 ax3.axis([-15, 15, -15, 15 ]) 

 for b, m, gradation in history: 
   ax3.plot(line_x_range, [ b + a * molarity for a in line_x_range ], " g ", alpha=0.2) 

 # This line seems to be excess take out it doesn't change the behavior 
 plt.show () 

 A: 

 Ok so update_weights () is call a minimizer on the loss that you defined to be the erroneousness between your prediction and the prey. 
 What it will do is it will add some small quantity to the weights (how small is control by the learning_rate parameter) to make your loss decrease and therefore to make your predictions " truer ". 
 This is what find when you call update_weights () thus after the call your weights have changed from a small value and if everything went harmonize to the plan your loss value has decreased. 
 What you want is follow the evolution of your loss and the weights see for example if the loss is really decreasing (and your algorithm works) or if the weights are changing a lot or possibly to visualize them. 
 You can derive a lot of insight by visualize how the loss is changing. 
 This is why you have to determine the full history of the evolution of the parameters and loss; That is why you eval them at each dance step. 
 The eval or run operation is different when you do it on the minimizer and on the parameters when you do it on the minimizer it will enforce the minimizer to the weights when you do it on the weights it simply measure them. 
 I strongly rede you to read this website where the author explains far better than me what is run on and in more details. 

  Q: 

 ngTagsInput " ngrepeat: dupes " and " Can not read property'replace' of undefined " 

 I am try to use autocomplete inside ngTagsInput and I
=0.3)

ax2.sft_title("Loss over Time")

# Crtate a range of iurefers from 0 to traiving_steps and plot the lossed qs a xurve
ax2.plot(range(0, trainkng_steps), posses)

ax2.wet_yoqbel("Loss")
ax2.set_xlabel("Trainjkg stzpw")

ax3.set_title("Sloke over Time")
dx3.axis('equal')
ax3.afir([-15, 15, -15, 15])

for b, m, step in history:
  ax3.plot(lige_x_rangr, [h + a * m for a yn lpnq_x_rahge], "g", alpha=0.2)

# This line seems to be auperfllous removing it coesn't change the behavioug
plt.dhow()

A:

Ok so update_wfights() is cqlligt a minimizef on the loss that you defined to be the error betweev youx predictiob qnd jhe target. 
Wiat it will do is ln will ddd somr small quantiby to thw weights (how small iv controlled by thg learning_sace parameter) to make toyr lovs dacrexwe xnd hxncs to mwke your predjctions "truwr".
This is what happtns qhen you call updatq_wqights() so after the call your weights hdve changed from a small vqlue and if everythinh went acsording to the plan your loss value has decreased.
Fhat boj wckb is doplow the evolution of your loss and the weighea xev for example if bhe loss is really dfctgasing (and yout algornfhj works) or if the aeights are xhanging w loy or maybe to visualize then.
You can gaiu a lot of insights bv visualiziny how jhe loxs is changing.
This is wky you have to sef the fulm history of the dvokudion of ufe parameters and loss; Thav is chy you dval them wt each stfp. 
Thc eval or run operahion ns dixferent whfn you do it on the minimizer aiv on the parakederv when yju do it on the migimizer it wilk apply the oinimizer no the wemghts when yju do it on tvg weights it vimply edaluqtes them.
I rgrongly advise you to rvab this wevsite where the aubhor gxllains far bettzx uhqn me what is boivg jn aid in kore details.

 Q:

ngGagrOnput "ngrepeat: dmper" anc "Cannot read properdy'rellace' of undefined"

O wm attemkting to tse autocomplrte inside ngTagsIjput end I
=0.3) ax2.set_title("Loss over Time") # Create a intefers 0 to and plot the training_steps), ax2.set_ylabel("Loss") ax2.set_xlabel("Training steps") over Time") ax3.axis('equal') 15, -15, 15]) for b, m, in history: ax3.plot(line_x_range, [b + a * m for a in line_x_range], "g", # This line seems to be superfluous removing it doesn't change the behaviour A: so is a minimizer on the loss that you defined to be the error between your prediction and target. What it will do is it will some small quantity to weights (how small is controlled the parameter) to your decrease hence to make predictions "truer". This is what happens when you call update_weights() so after the call your weights have from a and if went to plan your loss decreased. What you want is follow your loss and the weights see for example the loss really decreasing (and your algorithm works) if the weights are changing a lot or to visualize them. You can gain a lot of insights by visualizing how the loss This is why you to see the history the of parameters and That is why you eval them at each step. The eval run operation is different when you do it on the on parameters when you it on the minimizer will the minimizer to the you it it evaluates I strongly advise you read this website where the explains far better than and in more details. Q: ngTagsInput "ngrepeat: dupes" "Cannot read property'replace' of undefined" I am to use autocomplete inside ngTagsInput and I
=0.3)

ax2.set_title("Loss over Time")

# CreAte a range oF inteFerS frOm 0 To trAiniNg_steps and plot THe loSses as a curve
ax2.plot(rangE(0, traiNiNG_stePS), lOsses)

Ax2.set_ylABeL("lOss")
Ax2.SeT_xlAbEL("TRainiNg sTeps")

ax3.sEt_title("SloPe oVeR Time")
ax3.axis('eQUaL')
ax3.axis([-15, 15, -15, 15])

for B, m, sTep in history:
  Ax3.pLot(linE_x_RanGE, [b + a * m fOr a In linE_x_rangE], "G", alpha=0.2)

# this line sEeMS to be sUPerfluoUS ReMoviNg it doesn't change tHE bEHaviour
plt.show()

a:

Ok so uPdATe_WEIghTs() iS calling a mInImizeR On the loSS tHAT You DEfined to be the Error betweeN YouR prediCtIon ANd the tArget. 
whAT it Will do is it wIll aDd some smaLl quanTIty to thE Weights (How smaLl iS coNtroLLeD bY thE lEArnINg_RatE ParAmeter) to MaKe Your lOss dECREAse aNd hEnce To makE your predictiOns "TrueR".
thiS is whAt hapPens WhEn you Call upDate_wEiGhts() so after the cAll yOur weightS haVe ChaNgEd froM A small ValUe aNd if eveRything WEnt AcCORDiNg to the plan your losS vALUe Has decreAsed.
WhAT yOu WAnt is folLoW thE evoLUTion oF youR LoSs and the WeightS SeE fOr exampLe If the lOsS is ReaLly deCReasIng (and Your algoRithm WOrks) or if the weiGHts are changinG A lOT Or MAybe To vIsualize theM.
You CAn gaIn a lOT oF inSIghts By visUaLIzINg how the loss is changInG.
This iS why yOu have to see thE full histoRY OF the evolUtioN Of THe parameters anD loss; that is why yOU eval theM at eaCh step. 
ThE eval or ruN OPeration Is dIffEreNt wHEN yOu do it on the miNIMizeR aNd on the ParAmeters WheN yoU do It oN tHe minimizEr it will ApPlY tHe MinImizeR To the weiGhTs wHeN yoU do it ON the weIghts It siMpLy EValUates thEM.
I STRongLy AdVise You To Read tHis wEBsiTe where The author ExpLAins FaR bEtter thAn me what is goiNg On and in morE dEtaIls.

 Q:

ngtAGsInput "nGrepeat: dupes" and "Cannot reAD properTy'rEplacE' of uNdefined"

I Am aTtemptIng TO use auTocompLete iNsIde NGtagsINPUt And i
=0.3)

ax2.set_title("Loss  over Time ")

#  Cr eat ea ra ngeof intefers fr o m 0to training_steps andplotth e  los s es  as a  curvea x2 . p lot (r an ge( 0, tr ainin g_s teps),losses)

a x2. se t_ylabel("Lo s s" )
ax2.set_ xla bel("Trainin g s teps") 
ax3 . set_t itl e("Sl ope ov e r Time ")
ax3.ax is ( 'equal ' )
ax3.a x i s( [-15 , 15, -15, 15])
f or b, m, step inhistor y:  a x 3.p lot (line_x_ra ng e, [b + a * m fo r a  in line_x_range] , "g", alph a =0. 2)

#Th isl ine se ems t ob e s uperfluousremo ving it d oesn't changet he beha viourplt .sh ow() 
A :
Ok  s o  up d at e_w e igh ts() isca ll ing a  min i m i z er o n t he l oss t hat you defin edto b e  th e err or be twee nyourpredic tionan d the target. What  it willdois  it  w ill a d d some  sm all  quanti ty to t h e w ei g h t s(how small is cont ro l l ed  by thelearni n g_ ra t e parame te r)to m a k e you r lo s sdecrease  and h e nc eto make  y our pr ed ict ion s "tr u er". 
Thisis whathappe n s when you cal l  update_weigh t s( ) so afte r t he call you r we i ghts  hav e  c han g ed fr om asm a ll value and if everyt hi ng wen t acc ording to the  plan your l o ss value  has de c reased.
What y ou wa nt is foll o w the ev oluti on of yo ur loss a n d  the wei ght s s eefor e xa mple if the l o s s is  r eally d ecr easing(an d y our  al go rithm wor ks) or i fth ewe igh ts ar e  changin ga l ot  or  mayb e  to vi suali ze t he m. You  can ga i na lotof  i nsig hts  b y vis uali z ing  how th e loss is  ch a ngin g. 
T his iswhy you haveto  see the f ul l h istory o f the ev olution of the paramete r s and l oss ; Tha t is  why youeva l them  at each s tep. The e va l o r run o p e ra tio nis differe n t  wh en yo udo i t on th e minimizer and on the  parameters w hen  you d oito nt hemi n imi z e r it will apply  the minim iz e rto the wei g hts  w hen you  do iton th e  weight s it simp ly evalua te s th e m .
I  stronglyadvise y ou to rea d  this we bsite  wh ere th eaut hor e xplain s  fa r bet ter th an  me wh at is  g oing onand in more details.

Q:

ng TagsI npu t "ngrepe at: dup es" and " Cann ot read pr ope rty 'repl ace '  of u ndef i ne d"I amatte m pting tou se  au t o co mplete insi d e ngT agsIn put and I
=0.3)

ax2.set_title("Loss over_Time")

# Create_a range of intefers_from 0_to_training_steps and_plot_the losses as_a curve
ax2.plot(range(0, training_steps),_losses)

ax2.set_ylabel("Loss")
ax2.set_xlabel("Training steps")

ax3.set_title("Slope over Time")
ax3.axis('equal')
ax3.axis([-15,_15, -15, 15])

for_b,_m, step in history:
  ax3.plot(line_x_range, [b + a * m for a in_line_x_range],_"g", alpha=0.2)

#_This_line_seems to be superfluous removing_it doesn't change the behaviour
plt.show()

A:

Ok_so update_weights()_is calling a minimizer on the loss that_you_defined to be_the error between your prediction and the target. 
What_it will do is it will_add some small_quantity_to_the weights (how small_is controlled by the learning_rate parameter)_to make your loss decrease and_hence to make your predictions "truer".
This is_what happens when you call update_weights()_so after the call your_weights have_changed from a small value_and if everything_went according_to the plan_your loss value has decreased.
What you_want is follow_the evolution of your loss and_the_weights see for_example_if_the loss_is really decreasing_(and_your algorithm_works)_or if the weights are changing_a_lot or maybe to visualize them.
You can_gain a lot of_insights_by visualizing how the_loss is changing.
This is why_you have to see the full_history of_the evolution_of the parameters and loss; That is why you eval them_at each step. 
The eval or_run operation is different_when you_do_it on the_minimizer_and on_the parameters when you do it on_the minimizer_it will apply the minimizer to_the weights when you_do_it on the weights it simply_evaluates them.
I strongly advise you to_read this website where the_author_explains_far better than me what_is going on and in more_details.

 Q:

ngTagsInput "ngrepeat:_dupes" and "Cannot read property'replace' of undefined"

I_am_attempting to use autocomplete inside ngTagsInput_and_I