fix dim problem

gangliao-patch-1
qiaolongfei 8 years ago
parent 633082ad9d
commit 98bb8ee295

@ -109,6 +109,9 @@ class DenseScanner(IScanner):
if len(self.__shape__) > 3:
raise ValueError(
"The dimension of input cannot be greater than 3.")
if len(self.__shape__) == 0:
self.__dim__ = 1
else:
self.__dim__ = reduce(lambda x, y: x * y, self.__shape__)
if len(self.__shape__) == 1 and self.__dim__ != self.input_type.dim:
raise ValueError(

Loading…
Cancel
Save