@@ -1550,12 +1550,12 @@ def __init__(
15501550 if is_scale :
15511551 size_h = size [0 ] * int (self .inputs .get_shape ()[0 ])
15521552 size_w = size [1 ] * int (self .inputs .get_shape ()[1 ])
1553- size = [size_h , size_w ]
1553+ size = [int ( size_h ), int ( size_w ) ]
15541554 elif len (self .inputs .get_shape ()) == 4 :
15551555 if is_scale :
15561556 size_h = size [0 ] * int (self .inputs .get_shape ()[1 ])
15571557 size_w = size [1 ] * int (self .inputs .get_shape ()[2 ])
1558- size = [size_h , size_w ]
1558+ size = [int ( size_h ), int ( size_w ) ]
15591559 else :
15601560 raise Exception ("Donot support shape %s" % self .inputs .get_shape ())
15611561 print (" [TL] UpSampling2dLayer %s: is_scale:%s size:%s method:%d align_corners:%s" %
@@ -1604,12 +1604,12 @@ def __init__(
16041604 if is_scale :
16051605 size_h = size [0 ] * int (self .inputs .get_shape ()[0 ])
16061606 size_w = size [1 ] * int (self .inputs .get_shape ()[1 ])
1607- size = [size_h , size_w ]
1607+ size = [int ( size_h ), int ( size_w ) ]
16081608 elif len (self .inputs .get_shape ()) == 4 :
16091609 if is_scale :
16101610 size_h = size [0 ] * int (self .inputs .get_shape ()[1 ])
16111611 size_w = size [1 ] * int (self .inputs .get_shape ()[2 ])
1612- size = [size_h , size_w ]
1612+ size = [int ( size_h ), int ( size_w ) ]
16131613 else :
16141614 raise Exception ("Donot support shape %s" % self .inputs .get_shape ())
16151615 print (" [TL] DownSampling2dLayer %s: is_scale:%s size:%s method:%d, align_corners:%s" %
0 commit comments