aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/shape_inference_test.cc
Commit message (Collapse)AuthorAge
* Improvements to ResourceVariable + Variant code.Gravatar Eugene Brevdo2018-04-06
| | | | | | | | | | * Works in graph + eager modes * Fixed shape inference * Updated shape inference + refiner + constant eval code to support static shape tensor of `-1` meaning unknown shape. * Gather and Scatter for Variants now properly supported. * Variable copy-on-write for Variants now does a more shallow copy (as Variants are not expected to be updated "in-place" inside a variable; instead Variants will be updated via read-update-write inside a CriticalSection) PiperOrigin-RevId: 191975898
* Replaced calls to deprecated tensorflow::StringPiece methods with theirGravatar A. Unique TensorFlower2018-04-02
| | | | | | | | tensorflow::str_util equivalents. This will allow the deprecated methods to be removed. PiperOrigin-RevId: 191314576
* Cleanup: Ran clang-format on all *.{h,cc} files in tensorflow/core/framework.Gravatar A. Unique TensorFlower2018-01-26
| | | | PiperOrigin-RevId: 183429540
* Preserve symbolic shape information as much as possible during shape creationGravatar Benoit Steiner2017-12-08
| | | | PiperOrigin-RevId: 178448208
* Improved shape inferenceGravatar Benoit Steiner2017-11-17
| | | | PiperOrigin-RevId: 176147013
* Track merged shapes and dimensions more accurately.Gravatar Benoit Steiner2017-11-07
| | | | PiperOrigin-RevId: 174920827
* Shape inference for user-defined functions in TF. For now it is completely ↵Gravatar Max Galkin2017-09-26
| | | | | | | | "opt-in" via ShapeRefiner API and it doesn't yet affect any existing validation and inferences anywhere. Eventually graph validation should start using it. Doesn't yet support recursive functions and doesn't yet support more complex shape propagation scenarios where several iterations may be needed to infer shapes. PiperOrigin-RevId: 170078811
* Prepare to remove a bunch of proto.h includes from tensorflow/core headersGravatar Geoffrey Irving2017-06-29
| | | | | | | | | | | | The goal is to make kernels mostly independent of proto headers, which will let us lock down our .so imports. This CL does not remove any actual headers, but changes a bunch of files so that header removal is possible in a followup CL. It also marks the headers that will be removed with // TODO(b/62899350): Remove RELNOTES: n/a PiperOrigin-RevId: 160552878
* Infer shapes for loops during Grappler static inferenceGravatar A. Unique TensorFlower2017-06-20
| | | | PiperOrigin-RevId: 159570163
* Preallocate vector storage when the ultimate vector size is known in advanceGravatar A. Unique TensorFlower2017-06-01
| | | | PiperOrigin-RevId: 157724431
* Change shape inference so that a single resource tensor can carryGravatar A. Unique TensorFlower2017-05-25
| | | | | | | | shape and type information for multiple tensors. Apply this to QueueDequeueV2 handled by grappler. PiperOrigin-RevId: 157163757
* Added a unit test to check what happens when 2 shapes with known rank butGravatar Benoit Steiner2017-05-02
| | | | | unknown dimensions are merged Change: 154856675
* Change data_flow_ops.cc for deprecated TensorArray opsGravatar A. Unique TensorFlower2017-03-16
| | | | | | to have unknown shape function for cases where the shape function is incorrectly returning no outputs. Change: 150315933
* Add convenience methods to ShapeInference: MakeShapeFromTensorShape() and ↵Gravatar Peter Hawkins2017-03-06
| | | | | | MakeShapeFromPartialTensorShape(). Update existing users of MakeShapeFromShapeProto to use the new helper methods where possible. Change: 149353816
* Add the graphdef version to InferenceContext and to ShapeRefiner::AddNode.Gravatar A. Unique TensorFlower2017-03-03
| | | | | | | 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
* On shape inference errors, include summary of constant tensorsGravatar A. Unique TensorFlower2017-02-22
| | | | | | | | and constant-tensors-as-shapes used for computation. Moved assignment of requested_input_tensor_as_partial_shape_ up so it can be checked to determine what to include in the error message. Change: 148254547
* Move ValidateSparseTensor to common_shape_fns.h.Gravatar A. Unique TensorFlower2016-11-14
| | | | Change: 139112567
* Automated rollback of change 137740850Gravatar A. Unique TensorFlower2016-10-31
| | | | Change: 137747341
* Automated rollback of change 137731142Gravatar A. Unique TensorFlower2016-10-31
| | | | Change: 137740850
* Adds functionality for shape inference and dtype checking of variable-based ↵Gravatar A. Unique TensorFlower2016-10-31
| | | | | | | resources. Does not implement these resources yet as this change is big enough already. Change: 137731142
* In ShapeRefiner, add support for the C++ equivalent of the PythonGravatar A. Unique TensorFlower2016-10-25
| | | | | | | | | constant_value_as_tensor functions. This follows the same lazy-evaluation as getting constant tensors. Add validation in InferenceContext::MakeShapeFromShapeTensor for invalid values in the input tensor. Change: 137231472
* Make InferenceContext::Divide accept a DimensionHandle as the divisor.Gravatar A. Unique TensorFlower2016-10-25
| | | | Change: 137227660
* Get rid of testing constructor for InferenceContext, fix TODOs.Gravatar Vijay Vasudevan2016-10-12
| | | | | | | | | | Makes shapes owned by a private subclass of InferenceContext called ShapeManager (for lack of better name), friend classed ShapeInferenceTestutil so that conversion from string to shapes is private. Cleaned up extra arg from constructors by changing the two places that also do that to use a simple helper function to convert to TensorShapeProto. Change: 135956508
* TensorFlow: for shape inference errors, provide more context in theGravatar Vijay Vasudevan2016-09-30
| | | | | | | | error message thrown by C++ (which op and what the input shapes are). Update tests that looked for exact error messages to use .contains() for robustness. Change: 134796475
* Move SDCA optimizer kernels to core.Gravatar A. Unique TensorFlower2016-09-27
| | | | | See: tensorflow/contrib/linear_optimizer/kernels/g3doc/readme.md Change: 134452636
* Delegate to C++ shape inference function for some conv and pooling functions.Gravatar A. Unique TensorFlower2016-09-07
| | | | | | Change several C++ shape inference functions to not return an error if an input dimension is unknown; this more closely matches the python functions. Change: 132459740
* In C++ shape inference, change ShapeHandle and DimensionHandle into classesGravatar A. Unique TensorFlower2016-08-24
| | | | | that hide the implicit casts to and from a pointer. Change: 131209340
* Add shape_inference::ShapeHandle and shape_inference::DimensionHandle toGravatar A. Unique TensorFlower2016-08-23
| | | | | | | | replace uses of const Shape* and const Dimension*. This change only adds a typedef and updates references. A later change will make DimensionHandle and ShapeHandle real types instead of typedefs (to further hide the pointer access). Change: 131118981
* TensorFlow: Shape inference function for Slice operation in C++.Gravatar Vijay Vasudevan2016-08-11
| | | | | | Also add a helper for creating a shape with a specified number of unknown dimensions. Change: 130051201
* Validate shapes for set operations. Remove useless RegisterShape.Gravatar A. Unique TensorFlower2016-08-09
| | | | | | | Add more descriptive failure for TensorShape.as_list for unknown shapes. Add test to document asymmetry between TensorShape.__eq__ and TensorShape.__neq__. Change: 129752530
* Add C++ shape inference for SVD.Gravatar A. Unique TensorFlower2016-08-04
| | | | | | | | This also adds Min(), Max(), and Subtract() operators and a few convenience methods to the InferenceContext. Change test utils to emit a human readable error message in case the user forgot to set the inference function. Refactored shape_inference* a bit to enforce the invariant that a Dimension or DimensionOrConstant is always non-negative or equal to InferenceContext::kUnknownDim. This made it possible to tighten & simplify the arithmetic operations a bit. Change: 129385995
* TensorFlow: implement ExtractImagePatches shape fn, move ValidationGravatar Vijay Vasudevan2016-08-02
| | | | | | of KnownDim strewn across a few files into shape_inference.h with a simple unittest. Change: 129152593
* C++ shape inference for control flow ops.Gravatar Suharsh Sivakumar2016-08-01
| | | | Change: 129067423
* Cleanups for shape inference (mainly testing):Gravatar A. Unique TensorFlower2016-07-22
| | | | | | | | | - In shape inference test constructor, record an error and check it later in testing - this makes for nicer errors when there is a bad input spec. - Check that the number of inputs passed in the input spec matches what the NodeDef declares; fix up violations. - Remove constexpr kUnknownDim static in files. Change: 128188634
* Translate shape inference functions for sparse_ops to C++.Gravatar A. Unique TensorFlower2016-07-21
| | | | | | | | | Change shape_inference::InferenceContext::MakeShapeFromShapetensor to handle the case where the shape tensor is not known but the rank of the shape tensor is. Add shape_inference::NumElements(). Change: 128124939
* Add ShapeInference functions for DepthwiseConv2DNative, and MultiplyGravatar Vijay Vasudevan2016-07-21
| | | | | support to ShapeInference in support of DepthwiseConv. Change: 128114077
* Add C++ shape inference functions for several image ops.Gravatar A. Unique TensorFlower2016-07-20
| | | | | Change InferenceContext::ReplaceDim to support negative indexing. Change: 128022331
* Add C++ shape inference functions for more functions in nn_ops.cc.Gravatar A. Unique TensorFlower2016-07-19
| | | | | Add shape_inference::InferenceContext::ReplaceDim. Change: 127893881
* Add C++ shape inference function for Concat.Gravatar A. Unique TensorFlower2016-07-18
| | | | | Make shape_inference::InferenceContext::Add support adding two dimension. Change: 127744929
* Infer the number of outputs properly in shape_inference::InferenceContext,Gravatar A. Unique TensorFlower2016-07-15
| | | | | based on the nodedef and opdef. Change: 127602218
* Changes for C++ shape inference usability:Gravatar A. Unique TensorFlower2016-07-14
| | | | | | | - add Scalar,Vector,Matrix shorthands and use them in existing fns. - rename CreateUnknownShape to UnknownShape. - add Divide and Add functions. Change: 127487121
* Add InferenceContext::MakeShapeFromShapeProto(const TensorShapeProto& proto);Gravatar A. Unique TensorFlower2016-07-14
| | | | | | | | Rename CreateShapeXYZ to MakeShapeXYZ. Rename CreateDim to MakeDim. Rename CreateUnknownDim to UnknownDim. Rename CreateDimForScalarInput to MakeDimForScalarInput. Change: 127457122
* Add C++ shape inference for TopK and TopKV2.Gravatar A. Unique TensorFlower2016-07-12
| | | | | | | | | Change InferenceContext: - allow Dim(s, negative_idx) - add helper to get dimension value from scalar input tensor. - allow SubShape(s, start, end, &out). Support negative indexes, and indexes > rank, in SubShape (to match pythonic indexing). Change: 127206793
* Add C++ shape inference function for UnsortedSegmentSum.Gravatar A. Unique TensorFlower2016-07-07
| | | | Change: 126855302
* Add C++ shape inference functions for Fill, Gather, Reverse, Shape, andGravatar A. Unique TensorFlower2016-07-06
| | | | | also for array ops that use UnchangedShape. Change: 126741220
* Implement C++ shape inference functions for Select, Range, and LinSpace.Gravatar A. Unique TensorFlower2016-07-02
| | | | Change: 126488375
* Add C++ shape inference functions for ZerosLike, Diag, DiagPart, BatchDiagPart,Gravatar A. Unique TensorFlower2016-07-01
| | | | | BatchMatrixDiagPart, and BatchMatrixBandPart. Change: 126427288
* Add C++ shape inference for Pack, Unpack, and Const.Gravatar A. Unique TensorFlower2016-06-30
| | | | | | | | Add GetAttr to shape_inference::InferenceContext. Allow setting NodeDef in shape_inference_testutil INFER calls (with new INFER*_WITH_DEF macro). Fix a bug that caused a crash when an INFER..ERROR macro called a shape inference function that did not return an error. Change: 126350221
* Add shape functions in math_ops for unchanged shapes and segment reductionGravatar A. Unique TensorFlower2016-06-20
| | | | | | | | shapes. Also restored math_ops_test and shape_inference_testutil_test in BUILD file that were dropped from original change somehow. Change: 125376193
* In C++ shape inference, support registering a shape inference function in OPGravatar A. Unique TensorFlower2016-06-14
| | | | | | | | | registration. Change op registration signature to return Status and return the registration data as an out parameter. Add a shape inference function and test for AddN. Support in function library needs to be expanded in a future change. Change: 124871850