def test_step_clipping_no_threshold_regression():
 rule1 = StepClipping()
 assert (rule1.threshold is None)
 gradients = {0: shared_floatx(3.0), 1: shared_floatx(4.0)}
 (clipped1, updates) = rule1.compute_steps(gradients)
 assert (len(updates) == 0)
 assert (clipped1 == gradients)

def test_step_clipping_no_threshold_regression ( ) : rule1 = StepClipping ( ) assert ( rule1 . threshold is None ) gradients = { 0 : shared_floatx ( 3.0 ) , 1 : shared_floatx ( 4.0 ) } ( clipped1 , updates ) = rule1 . compute_steps ( gradients ) assert ( len ( updates ) == 0 ) assert ( clipped1 == gradients )
test regression for #1145 .