L update fix

Sat, 20 Apr 2024 13:54:22 +0300

author
Neil Dizon <neil.dizon@helsinki.fi>
date
Sat, 20 Apr 2024 13:54:22 +0300
changeset 13
dc6339756e35
parent 12
73f5e9bd63cf
child 14
c286925c0f35

L update fix

src/PET/AlgorithmDualScaling.jl file | annotate | diff | comparison | revisions
src/PET/AlgorithmGreedy.jl file | annotate | diff | comparison | revisions
src/PET/AlgorithmNoPrediction.jl file | annotate | diff | comparison | revisions
src/PET/AlgorithmPrimalOnly.jl file | annotate | diff | comparison | revisions
src/PET/AlgorithmProximal.jl file | annotate | diff | comparison | revisions
src/PET/AlgorithmRotation.jl file | annotate | diff | comparison | revisions
--- a/src/PET/AlgorithmDualScaling.jl	Sat Apr 20 12:42:22 2024 +0300
+++ b/src/PET/AlgorithmDualScaling.jl	Sat Apr 20 13:54:22 2024 +0300
@@ -153,11 +153,11 @@
             petgrad!(oldpetgradx, oldx, b, c, S)
             if norm₂(x-oldx)>1e-12
                 L = max(0.9*norm₂(petgradx - oldpetgradx)/norm₂(x-oldx),L)
+                println("Step length parameters: L=$(L)")
+                τ = τ₀/L
+                σ = σ₀*(1-τ₀)/(R_K²*τ)
             end  
-            println("Step length parameters: L=$(L)")
-            τ = τ₀/L
-            σ = σ₀*(1-τ₀)/(R_K²*τ)
-        end     
+        end       
        
         ################################
         # Give function value if needed
--- a/src/PET/AlgorithmGreedy.jl	Sat Apr 20 12:42:22 2024 +0300
+++ b/src/PET/AlgorithmGreedy.jl	Sat Apr 20 13:54:22 2024 +0300
@@ -153,11 +153,11 @@
             petgrad!(oldpetgradx, oldx, b, c, S)
             if norm₂(x-oldx)>1e-12
                 L = max(0.9*norm₂(petgradx - oldpetgradx)/norm₂(x-oldx),L)
+                println("Step length parameters: L=$(L)")
+                τ = τ₀/L
+                σ = σ₀*(1-τ₀)/(R_K²*τ)
             end  
-            println("Step length parameters: L=$(L)")
-            τ = τ₀/L
-            σ = σ₀*(1-τ₀)/(R_K²*τ)
-        end     
+        end       
        
         ################################
         # Give function value if needed
--- a/src/PET/AlgorithmNoPrediction.jl	Sat Apr 20 12:42:22 2024 +0300
+++ b/src/PET/AlgorithmNoPrediction.jl	Sat Apr 20 13:54:22 2024 +0300
@@ -153,11 +153,11 @@
             petgrad!(oldpetgradx, oldx, b, c, S)
             if norm₂(x-oldx)>1e-12
                 L = max(0.9*norm₂(petgradx - oldpetgradx)/norm₂(x-oldx),L)
+                println("Step length parameters: L=$(L)")
+                τ = τ₀/L
+                σ = σ₀*(1-τ₀)/(R_K²*τ)
             end  
-            println("Step length parameters: L=$(L)")
-            τ = τ₀/L
-            σ = σ₀*(1-τ₀)/(R_K²*τ)
-        end     
+        end      
        
         ################################
         # Give function value if needed
--- a/src/PET/AlgorithmPrimalOnly.jl	Sat Apr 20 12:42:22 2024 +0300
+++ b/src/PET/AlgorithmPrimalOnly.jl	Sat Apr 20 13:54:22 2024 +0300
@@ -153,11 +153,11 @@
             petgrad!(oldpetgradx, oldx, b, c, S)
             if norm₂(x-oldx)>1e-12
                 L = max(0.9*norm₂(petgradx - oldpetgradx)/norm₂(x-oldx),L)
+                println("Step length parameters: L=$(L)")
+                τ = τ₀/L
+                σ = σ₀*(1-τ₀)/(R_K²*τ)
             end  
-            println("Step length parameters: L=$(L)")
-            τ = τ₀/L
-            σ = σ₀*(1-τ₀)/(R_K²*τ)
-        end     
+        end       
        
         ################################
         # Give function value if needed
--- a/src/PET/AlgorithmProximal.jl	Sat Apr 20 12:42:22 2024 +0300
+++ b/src/PET/AlgorithmProximal.jl	Sat Apr 20 13:54:22 2024 +0300
@@ -182,10 +182,11 @@
             petgrad!(oldpetgradx, oldx, b, c, S)
             if norm₂(x-oldx)>1e-12
                 L = max(0.9*norm₂(petgradx - oldpetgradx)/norm₂(x-oldx),L)
+                println("Step length parameters: L=$(L)")
+                τ = τ₀/L
+                σ = σ₀*(1-τ₀)/(R_K²*τ)
             end  
-            #println("Step length parameters: L=$(L)")
-            τ, σ, σ̃, ρ̃ = step_lengths(params, γ, R_K², L)
-        end     
+        end       
        
         ################################
         # Give function value if needed
--- a/src/PET/AlgorithmRotation.jl	Sat Apr 20 12:42:22 2024 +0300
+++ b/src/PET/AlgorithmRotation.jl	Sat Apr 20 13:54:22 2024 +0300
@@ -153,10 +153,10 @@
             petgrad!(oldpetgradx, oldx, b, c, S)
             if norm₂(x-oldx)>1e-12
                 L = max(0.9*norm₂(petgradx - oldpetgradx)/norm₂(x-oldx),L)
+                println("Step length parameters: L=$(L)")
+                τ = τ₀/L
+                σ = σ₀*(1-τ₀)/(R_K²*τ)
             end  
-            println("Step length parameters: L=$(L)")
-            τ = τ₀/L
-            σ = σ₀*(1-τ₀)/(R_K²*τ)
         end     
        
         ################################

mercurial