| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId: 191314576
|
|
|
|
| |
PiperOrigin-RevId: 183429540
|
|
|
|
| |
PiperOrigin-RevId: 178448208
|
|
|
|
| |
PiperOrigin-RevId: 176147013
|
|
|
|
| |
PiperOrigin-RevId: 174920827
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 159570163
|
|
|
|
| |
PiperOrigin-RevId: 157724431
|
|
|
|
|
|
|
|
| |
shape and type information for multiple tensors.
Apply this to QueueDequeueV2 handled by grappler.
PiperOrigin-RevId: 157163757
|
|
|
|
|
| |
unknown dimensions are merged
Change: 154856675
|
|
|
|
|
|
| |
to have unknown shape function for cases where the shape
function is incorrectly returning no outputs.
Change: 150315933
|
|
|
|
|
|
| |
MakeShapeFromPartialTensorShape(). Update existing users of MakeShapeFromShapeProto to use the new helper methods where possible.
Change: 149353816
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change: 139112567
|
|
|
|
| |
Change: 137747341
|
|
|
|
| |
Change: 137740850
|
|
|
|
|
|
|
| |
resources.
Does not implement these resources yet as this change is big enough already.
Change: 137731142
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change: 137227660
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
See: tensorflow/contrib/linear_optimizer/kernels/g3doc/readme.md
Change: 134452636
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
that hide the implicit casts to and from a pointer.
Change: 131209340
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Also add a helper for creating a shape with a specified number
of unknown dimensions.
Change: 130051201
|
|
|
|
|
|
|
| |
Add more descriptive failure for TensorShape.as_list for unknown shapes.
Add test to document asymmetry between TensorShape.__eq__ and TensorShape.__neq__.
Change: 129752530
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
of KnownDim strewn across a few files into shape_inference.h with
a simple unittest.
Change: 129152593
|
|
|
|
| |
Change: 129067423
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
support to ShapeInference in support of DepthwiseConv.
Change: 128114077
|
|
|
|
|
| |
Change InferenceContext::ReplaceDim to support negative indexing.
Change: 128022331
|
|
|
|
|
| |
Add shape_inference::InferenceContext::ReplaceDim.
Change: 127893881
|
|
|
|
|
| |
Make shape_inference::InferenceContext::Add support adding two dimension.
Change: 127744929
|
|
|
|
|
| |
based on the nodedef and opdef.
Change: 127602218
|
|
|
|
|
|
|
| |
- add Scalar,Vector,Matrix shorthands and use them in existing fns.
- rename CreateUnknownShape to UnknownShape.
- add Divide and Add functions.
Change: 127487121
|
|
|
|
|
|
|
|
| |
Rename CreateShapeXYZ to MakeShapeXYZ.
Rename CreateDim to MakeDim.
Rename CreateUnknownDim to UnknownDim.
Rename CreateDimForScalarInput to MakeDimForScalarInput.
Change: 127457122
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change: 126855302
|
|
|
|
|
| |
also for array ops that use UnchangedShape.
Change: 126741220
|
|
|
|
| |
Change: 126488375
|
|
|
|
|
| |
BatchMatrixDiagPart, and BatchMatrixBandPart.
Change: 126427288
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
shapes.
Also restored math_ops_test and shape_inference_testutil_test in BUILD file
that were dropped from original change somehow.
Change: 125376193
|
|
|
|
|
|
|
|
|
| |
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
|