---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-94-7923874bb0d7> in <module>
10 ], name ="data_augmentation")
11
---> 12 data_augmentation(inputs)
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in __call__(self, *args, **kwargs)
950 if _in_functional_construction_mode(self, inputs, args, kwargs, input_list):
951 return self._functional_construction_call(inputs, args, kwargs,
--> 952 input_list)
953
954 # Maintains info about the `Layer.call` stack.
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in _functional_construction_call(self, inputs, args, kwargs, input_list)
1089 # Check input assumptions set after layer building, e.g. input shape.
1090 outputs = self._keras_tensor_symbolic_call(
-> 1091 inputs, input_masks, args, kwargs)
1092
1093 if outputs is None:
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in _keras_tensor_symbolic_call(self, inputs, input_masks, args, kwargs)
820 return nest.map_structure(keras_tensor.KerasTensor, output_signature)
821 else:
--> 822 return self._infer_output_signature(inputs, args, kwargs, input_masks)
823
824 def _infer_output_signature(self, inputs, args, kwargs, input_masks):
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in _infer_output_signature(self, inputs, args, kwargs, input_masks)
861 # TODO(kaftan): do we maybe_build here, or have we already done it?
862 self._maybe_build(inputs)
--> 863 outputs = call_fn(inputs, *args, **kwargs)
864
865 self._handle_activity_regularization(inputs, outputs)
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\engine\sequential.py in call(self, inputs, training, mask)
387 kwargs['training'] = training
388
--> 389 outputs = layer(inputs, **kwargs)
390
391 if len(nest.flatten(outputs)) != 1:
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\engine\base_layer.py in __call__(self, *args, **kwargs)
1010 with autocast_variable.enable_auto_cast_variables(
1011 self._compute_dtype_object):
-> 1012 outputs = call_fn(inputs, *args, **kwargs)
1013
1014 if self._activity_regularizer:
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\layers\preprocessing\image_preprocessing.py in call(self, inputs, training)
865
866 output = control_flow_util.smart_cond(training, random_rotated_inputs,
--> 867 lambda: inputs)
868 output.set_shape(inputs.shape)
869 return output
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\utils\control_flow_util.py in smart_cond(pred, true_fn, false_fn, name)
113 pred, true_fn=true_fn, false_fn=false_fn, name=name)
114 return smart_module.smart_cond(
--> 115 pred, true_fn=true_fn, false_fn=false_fn, name=name)
116
117
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\framework\smart_cond.py in smart_cond(pred, true_fn, false_fn, name)
52 if pred_value is not None:
53 if pred_value:
---> 54 return true_fn()
55 else:
56 return false_fn()
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\layers\preprocessing\image_preprocessing.py in random_rotated_inputs()
859 return transform(
860 inputs,
--> 861 get_rotation_matrix(angles, img_hd, img_wd),
862 fill_mode=self.fill_mode,
863 fill_value=self.fill_value,
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\keras\layers\preprocessing\image_preprocessing.py in get_rotation_matrix(angles, image_height, image_width, name)
755 math_ops.cos(angles)[:, None],
756 y_offset[:, None],
--> 757 array_ops.zeros((num_angles, 2), dtypes.float32),
758 ],
759 axis=1)
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\util\dispatch.py in wrapper(*args, **kwargs)
199 """Call target, and fall back on dispatchers if there is a TypeError."""
200 try:
--> 201 return target(*args, **kwargs)
202 except (TypeError, ValueError):
203 # Note: convert_to_eager_tensor currently raises a ValueError, not a
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\ops\array_ops.py in wrapped(*args, **kwargs)
2817
2818 def wrapped(*args, **kwargs):
-> 2819 tensor = fun(*args, **kwargs)
2820 tensor._is_zeros_tensor = True
2821 return tensor
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\ops\array_ops.py in zeros(shape, dtype, name)
2866 # Create a constant if it won't be very big. Otherwise create a fill
2867 # op to prevent serialized GraphDefs from becoming too large.
-> 2868 output = _constant_if_small(zero, shape, dtype, name)
2869 if output is not None:
2870 return output
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\ops\array_ops.py in _constant_if_small(value, shape, dtype, name)
2802 def _constant_if_small(value, shape, dtype, name):
2803 try:
-> 2804 if np.prod(shape) < 1000:
2805 return constant(value, shape=shape, dtype=dtype, name=name)
2806 except TypeError:
<__array_function__ internals> in prod(*args, **kwargs)
~\anaconda3\envs\ds-py37\lib\site-packages\numpy\core\fromnumeric.py in prod(a, axis, dtype, out, keepdims, initial, where)
3029 """
3030 return _wrapreduction(a, np.multiply, 'prod', axis, dtype, out,
-> 3031 keepdims=keepdims, initial=initial, where=where)
3032
3033
~\anaconda3\envs\ds-py37\lib\site-packages\numpy\core\fromnumeric.py in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs)
85 return reduction(axis=axis, out=out, **passkwargs)
86
---> 87 return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
88
89
~\anaconda3\envs\ds-py37\lib\site-packages\tensorflow\python\framework\ops.py in __array__(self)
853 "Cannot convert a symbolic Tensor ({}) to a numpy array."
854 " This error may indicate that you're trying to pass a Tensor to"
--> 855 " a NumPy call, which is not supported".format(self.name))
856
857 def __len__(self):
NotImplementedError: Cannot convert a symbolic Tensor (data_augmentation/random_rotation_10/rotation_matrix/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported