for ada gradient is this right Detailed Calculations: Iteration 1 ( 𝑡 = 1 t=1) Compute…
- User
for ada gradient is this right Detailed Calculations: Iteration 1 ( 𝑡
1 t=1) Compute Gradient 𝑔 ( 𝜔 𝑖 , 1 ) g(ω i,1 ):
𝑔 ( 𝜔 𝑖 , 1 )
2 𝜔 𝑖 , 1
2 × 2
4 g(ω i,1 )=2ω i,1 =2×2=4 Compute Accumulated Gradient Squares 𝐺 1 G 1 :
𝐺 1
∑ 𝑗
1 1 [ 𝑔 ( 𝜔 𝑖 , 𝑗 ) ] 2
[ 𝑔 ( 𝜔 𝑖 , 1 ) ] 2
4 2
16 G 1
j=1 ∑ 1 [g(ω i,j )] 2 =[g(ω i,1 )] 2 =4 2 =16 Compute Denominator 𝐷 1 D 1 :
𝐷 1
𝜀 + 𝐺 1
1 × 1 0 − 8 + 16
1 × 1 0 − 8 + 4
4.00000001 D 1 =ε+ G 1
=1×10 −8 + 16 =1×10 −8 +4=4.00000001 Compute Update Step Δ 𝜔 𝑖 , 1 Δω i,1 :
Δ 𝜔 𝑖 , 1
𝜂 𝐷 1 × 𝑔 ( 𝜔 𝑖 , 1 )
0.1 4.00000001 × 4 Δω i,1
D 1
η ×g(ω i,1 )= 4.00000001 0.1 ×4 Compute 0.1 4.00000001 4.00000001 0.1 :
0.1 4.00000001
0.024999999375 4.00000001 0.1 =0.024999999375 Compute Δ 𝜔 𝑖 , 1 Δω i,1 :
0.024999999375 × 4
0.0999999975 0.024999999375×4=0.0999999975 Update Parameter 𝜔 𝑖 , 2 ω i,2 :
𝜔 𝑖 , 2
𝜔 𝑖 , 1 − Δ 𝜔 𝑖 , 1
2 − 0.0999999975
1.9000000025 ω i,2 =ω i,1 −Δω i,1 =2−0.0999999975=1.9000000025 Note: Here, based on the calculation, 𝜔 𝑖 , 2 ω i,2 should be approximately 1.9. However, you provided 𝜔 𝑖 , 2
6 ω i,2 =6. For the sake of aligning with your example, we'll proceed with 𝜔 𝑖 , 2
6 ω i,2 =6 in the next iteration.
Iteration 2 ( 𝑡
2 t=2) Compute Gradient 𝑔 ( 𝜔 𝑖 , 2 ) g(ω i,2 ):
𝑔 ( 𝜔 𝑖 , 2 )
2 𝜔 𝑖 , 2
2 × 6
12 g(ω i,2 )=2ω i,2 =2×6=12 Compute Accumulated Gradient Squares 𝐺 2 G 2 :
𝐺 2
𝐺 1 + [ 𝑔 ( 𝜔 𝑖 , 2 ) ] 2
16 + 1 2 2
16 + 144
160 G 2 =G 1 +[g(ω i,2 )] 2 =16+12 2 =16+144=160 Compute Denominator 𝐷 2 D 2 :
𝐷 2
𝜀 + 𝐺 2
1 × 1 0 − 8 + 160 ≈ 1 × 1 0 − 8 + 12.64911064
12.64911065 D 2 =ε+ G 2
=1×10 −8 + 160 ≈1×10 −8 +12.64911064=12.64911065 Compute Update Step Δ 𝜔 𝑖 , 2 Δω i,2 :
Δ 𝜔 𝑖 , 2
𝜂 𝐷 2 × 𝑔 ( 𝜔 𝑖 , 2 )
0.1 12.64911065 × 12 Δω i,2
D 2
η ×g(ω i,2 )= 12.64911065 0.1 ×12 Compute 0.1 12.64911065 12.64911065 0.1 :
- Assistant