Commit ac22e158 authored by Asim Shankar's avatar Asim Shankar Committed by TensorFlower Gardener
Browse files

Gracefully disallow updating resource variables with invalid shapes.

During graph construction, the shape function for AssignAddVariableOp etc.
would raise an error when the value being "assign add"ed to the variable
has an incompatible shape.

With eager execution, no such validation was being made which triggerred
an assertion failure in eigen:
https://github.com/eigenteam/eigen-git-mirror/blob/7d97e1cbbe4424fda39e31c88def7c0863897640/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h#L479

This change prevents that assertion failure.

PiperOrigin-RevId: 215749071
parent a7e8ad18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment