Commit 1d74a694 authored by Skye Wanderman-Milne's avatar Skye Wanderman-Milne Committed by TensorFlower Gardener
Browse files

Enable fetching shapes from the C API by default.

Prior this change, we were using the C API for everything except
Tensor.shape calls, which returned the result from the original Python
shape inference code. With this change, we use the C API in this case
as well. The C API has better shape inference, so this has the effect
of returning more precise shapes in some cases.

This change can be disabled by setting the environment variable
TF_C_API_GRAPH_CONSTRUCTION_SHAPES=0. However, this toggle will
be removed altogether in the near future.

This also fixes a bug in the SWIG that could cause large shape dimensions
to be incorrect.

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