summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/conda-recipe
diff options
context:
space:
mode:
authordkazanc <dkazanc@hotmail.com>2018-10-11 13:58:04 +0100
committerdkazanc <dkazanc@hotmail.com>2018-10-11 13:58:04 +0100
commit6887ae5026e20fa8acad644f040fdab1a085e772 (patch)
treea44be3e78745fbca0ecca1f67585c755f11836c3 /Wrappers/Python/conda-recipe
parent56d876e94e67f0d774627378c0527ae7b390e13a (diff)
downloadregularization-6887ae5026e20fa8acad644f040fdab1a085e772.tar.gz
regularization-6887ae5026e20fa8acad644f040fdab1a085e772.tar.bz2
regularization-6887ae5026e20fa8acad644f040fdab1a085e772.tar.xz
regularization-6887ae5026e20fa8acad644f040fdab1a085e772.zip
fixes tests/demos and closes #43
Diffstat (limited to 'Wrappers/Python/conda-recipe')
-rwxr-xr-xWrappers/Python/conda-recipe/run_test.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Wrappers/Python/conda-recipe/run_test.py b/Wrappers/Python/conda-recipe/run_test.py
index 398ef60..86013a3 100755
--- a/Wrappers/Python/conda-recipe/run_test.py
+++ b/Wrappers/Python/conda-recipe/run_test.py
@@ -65,8 +65,8 @@ class TestRegularisers(unittest.TestCase):
pars = {'algorithm': ROF_TV, \
'input' : u0,\
'regularisation_parameter':0.04,\
- 'number_of_iterations': 1200,\
- 'time_marching_parameter': 0.0025
+ 'number_of_iterations': 1000,\
+ 'time_marching_parameter': 0.0001
}
print ("#############ROF TV CPU####################")
start_time = timeit.default_timer()
@@ -94,7 +94,7 @@ class TestRegularisers(unittest.TestCase):
txtstr += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time)
print (txtstr)
print ("--------Compare the results--------")
- tolerance = 1e-05
+ tolerance = 1e-04
diff_im = np.zeros(np.shape(rof_cpu))
diff_im = abs(rof_cpu - rof_gpu)
diff_im[diff_im > tolerance] = 1
@@ -361,8 +361,8 @@ class TestRegularisers(unittest.TestCase):
'input' : u0,\
'regularisation_parameterROF':0.04, \
'regularisation_parameterLLT':0.01, \
- 'number_of_iterations' :500 ,\
- 'time_marching_parameter' :0.0025 ,\
+ 'number_of_iterations' :1000 ,\
+ 'time_marching_parameter' :0.0001 ,\
}
print ("#############LLT- ROF CPU####################")
@@ -394,7 +394,7 @@ class TestRegularisers(unittest.TestCase):
txtstr += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time)
print (txtstr)
print ("--------Compare the results--------")
- tolerance = 1e-05
+ tolerance = 1e-04
diff_im = np.zeros(np.shape(lltrof_gpu))
diff_im = abs(lltrof_cpu - lltrof_gpu)
diff_im[diff_im > tolerance] = 1
@@ -643,14 +643,14 @@ class TestRegularisers(unittest.TestCase):
Im = np.asarray(Im, dtype='float32')
"""
tolerance = 1e-05
- rms_rof_exp = 0.006812507 #expected value for ROF model
+ rms_rof_exp = 8.313131464999238e-05 #expected value for ROF model
# set parameters for ROF-TV
pars_rof_tv = {'algorithm': ROF_TV, \
'input' : Im,\
'regularisation_parameter':0.04,\
'number_of_iterations': 50,\
- 'time_marching_parameter': 0.0025
+ 'time_marching_parameter': 0.00001
}
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
print ("_________testing ROF-TV (2D, CPU)__________")
@@ -715,14 +715,14 @@ class TestRegularisers(unittest.TestCase):
Im = Im/255
tolerance = 1e-05
- rms_rof_exp = 0.006812507 #expected value for ROF model
+ rms_rof_exp = 8.313131464999238e-05 #expected value for ROF model
# set parameters for ROF-TV
pars_rof_tv = {'algorithm': ROF_TV, \
'input' : Im,\
'regularisation_parameter':0.04,\
'number_of_iterations': 50,\
- 'time_marching_parameter': 0.0025
+ 'time_marching_parameter': 0.00001
}
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
print ("_________testing ROF-TV (2D, GPU)__________")