@@ -563,11 +563,11 @@ def build(self, input_shape):
563
563
"""Implements build() for the layer."""
564
564
dtype = tf .as_dtype (self .dtype or tf .keras .backend .floatx ())
565
565
if not (dtype .is_floating or dtype .is_complex ):
566
- raise TypeError ("Unable to build `Dense ` layer with non-floating point "
567
- "dtype %s" % (dtype ,))
566
+ raise TypeError ("Unable to build `Dense3D ` layer with non-floating "
567
+ "point (and non-complex) dtype %s" % (dtype ,))
568
568
input_shape = tf .TensorShape (input_shape )
569
569
if tf .compat .dimension_value (input_shape [- 1 ]) is None :
570
- raise ValueError ("The last dimension of the inputs to `Dense ` "
570
+ raise ValueError ("The last dimension of the inputs to `Dense3D ` "
571
571
"should be defined. Found `None`." )
572
572
self .last_dim = tf .compat .dimension_value (input_shape [- 1 ])
573
573
self .input_spec = tf .keras .layers .InputSpec (
@@ -648,12 +648,14 @@ def build(self, input_shape):
648
648
"""Implements build() for the layer."""
649
649
dtype = tf .as_dtype (self .dtype or tf .keras .backend .floatx ())
650
650
if not (dtype .is_floating or dtype .is_complex ):
651
- raise TypeError ("Unable to build `Dense` layer with non-floating point "
651
+ raise TypeError ("Unable to build `Dense2DProjection` layer with "
652
+ "non-floating point (and non-complex) "
652
653
"dtype %s" % (dtype ,))
653
654
input_shape = tf .TensorShape (input_shape )
654
655
if tf .compat .dimension_value (input_shape [- 1 ]) is None :
655
- raise ValueError ("The last dimension of the inputs to `Dense` "
656
- "should be defined. Found `None`." )
656
+ raise ValueError ("The last dimension of the inputs to "
657
+ "`Dense2DProjection` should be defined. "
658
+ "Found `None`." )
657
659
last_dim = tf .compat .dimension_value (input_shape [- 1 ])
658
660
self .input_spec = tf .keras .layers .InputSpec (min_ndim = 3 , axes = {- 1 : last_dim })
659
661
self .kernel = self .add_weight (
0 commit comments