Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed NotImplementedError: Cannot convert a symbolic Tensor to a numpy array #47957

Merged
merged 1 commit into from
Jun 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensorflow/python/ops/array_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2895,7 +2895,7 @@ def _constant_if_small(value, shape, dtype, name):
try:
if np.prod(shape) < 1000:
return constant(value, shape=shape, dtype=dtype, name=name)
except TypeError:
except (NotImplementedError, TypeError):
# Happens when shape is a Tensor, list with Tensor elements, etc.
pass
return None
Expand Down