File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -670,7 +670,7 @@ def _get_default_param_initializer():
670
670
'contextStart' : - int (filter_size / 2 ),
671
671
'contextLength' : filter_size
672
672
})
673
- pre_act = helper .append_bias_op (pre_bias , _get_default_bias_initializer )
673
+ pre_act = helper .append_bias_op (pre_bias , bias_initializer )
674
674
return helper .append_activation (pre_act )
675
675
676
676
Original file line number Diff line number Diff line change 1
1
import unittest
2
- from paddle .v2 .fluid .framework import Variable , g_main_program , Program
2
+ from paddle .v2 .fluid .framework import g_main_program , Program , convert_np_dtype_to_dtype_
3
3
import paddle .v2 .fluid .core as core
4
4
import numpy as np
5
5
6
6
7
7
class TestVariable (unittest .TestCase ):
8
8
def test_np_dtype_convert (self ):
9
9
DT = core .DataType
10
- convert = Variable . _convert_np_dtype_to_dtype_
10
+ convert = convert_np_dtype_to_dtype_
11
11
self .assertEqual (DT .FP32 , convert (np .float32 ))
12
12
self .assertEqual (DT .FP16 , convert ("float16" ))
13
13
self .assertEqual (DT .FP64 , convert ("float64" ))
You can’t perform that action at this time.
0 commit comments