Explicit constructor call is no less clear and match what we export via
the public API.
The functions will be removed once all the internal users are migrated.
PiperOrigin-RevId: 259620054
This includes some changes to operator overloading:
(a) TensorNode is more consistent with the operator overloads in Tensor
(b) Additionally, it has __eq__ and __ne__ overloads which were needed
to make the transition from ops.embedding_lookup to tf.nn.embedding_lookup
possible. However, this is inconsistent with overloads for Tensor
so is something that will be looked at in a follow up.
PiperOrigin-RevId: 165816199
END_PUBLIC
---
Commit daa67ad17 authored by Jonathan Hseu<vomjom@vomjom.net>
Committed by Frank Chen<frankchn@gmail.com>:
Remove unittest import (#11596)
---
Commit 491beb74c authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 162423171
PiperOrigin-RevId: 162541442
Use this to allow loading reductions saved with older graphdefs.
Change GraphConstructor to not increase the version when importing, but instead take the min of all versions.
Change: 149152437
values to rerun the shape inference function. This removes the need to pass
input_tensors_needed and input_tensor_as_shapes_needed.
Remove calls to call_cpp_shape_fn that pass input_tensors_needed or
inptu_tensor_as_shapes_needed.
Change: 139228180
Remove explicit RegisterShape calls that used call_cpp_shape_fn without
input_tensors_needed arguments.
Remove requirement that C++ shape functions be specified.
Change: 139089667
inference. Delegate to C++ shape function for Reshape.
Fix reshape to handle attempting to infer unknown dim when product of known
elements is 0.
Change: 137837591
Also:
- Fix output depth dimension computation for C++ ExtractImagePatches function.
- Add dim range check to ExpandDims.
- Make debug_python_shape_fn error if python shape fn returns an error when
C++ does not.
- Add C++ implementations for StridedSliceGrad; this gives slightly more
accurate output when input shape but not constant values is known.
Change: 132910226
implementation (fractional pool ones don't yet).
Change BiasAdd functions to require only rank 3, not 4, for NHWC. This matches
the behavior of GetBiasValueDims in bias_op.cc.
Removed unused functions common_shapes.bias_add_shape and
common_shapes.bias_add_grad_shape.
Change: 132597521
Change C++ shape function for ExpandDims to be more permissive - it now allows
'dim' to be any tensor with 1 element, although that is not currently
converted to use C++ because of a separate issue to fix first (later change).
Change C++ shape functions for SpaceToBatch and BatchToSpace to output rank-4
unknown shapes.
Change: 132578764
allow passing the result of python's constant_value for some input tensors.
Use this on some existing math ops to delegate to python.
This updates Pack to merge all inputs before checking ndims is None, which
allows more merging possibilities.
Changes to Reduction C++ shape function to match python version.
Change: 132434990
don't require access to the input constant tensor, and for which the C++
function's behavior matches python.
Fix rank check in C++ BatchMatMul shape function.
Fix rank check in C++ sparse cwise shape function.
Add an option on common_shapes.call_cpp_shape_fn to verify against the python
shape function. This is meant to be called only when preparing a change to
switch shape functions over.
Change: 131739513
move client/graph_util.py
ops/common_shapes.py
ops/constant_op.py
ops/op_def_library.py to framework/.
Also moved 2 corresponding test files and fixed some linting errors
Change: 124885409