Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 57 for Shape (0.24 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tensorflow/c/c_api_experimental.cc

        ShapeHandle shape_handle = c.output(i);
        TF_ShapeAndType& shape = output_shapes_result->items[i];
        shape.num_dims = c.Rank(shape_handle);
        if (shape.num_dims == InferenceContext::kUnknownRank) {
          shape.dims = nullptr;
          continue;
        }
        shape.dims = new int64_t[shape.num_dims];
        for (size_t j = 0; j < shape.num_dims; ++j) {
          shape.dims[j] = c.Value(c.Dim(shape_handle, j));
        }
      }
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 04 05:55:32 GMT 2025
    - 29.4K bytes
    - Click Count (0)
  2. tensorflow/c/eager/immediate_execution_tensor_handle.h

      // Returns size of specified dimension
      //
      // -1 indicates an unknown axis length; this is unreachable for most standard
      // ImmediateExecutionTensorHandles, but comes up for example when computing
      // the shape of a parallel tensor with component shapes differing across
      // devices.
      virtual absl::Status Dim(int dim_index, int64_t* dim) const = 0;
    
      // Returns the device which created the handle.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 4.3K bytes
    - Click Count (0)
  3. tensorflow/c/c_api_test.cc

    }
    
    TEST(CAPI, ShapeInferenceError) {
      // TF_FinishOperation should fail if the shape of the added operation cannot
      // be inferred.
      TF_Status* status = TF_NewStatus();
      TF_Graph* graph = TF_NewGraph();
    
      // Create this failure by trying to add two nodes with incompatible shapes
      // (A tensor with shape [2] and a tensor with shape [3] cannot be added).
      const char data[] = {1, 2, 3};
      const int64_t vec2_dims[] = {2};
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Wed Jan 07 04:56:09 GMT 2026
    - 97.3K bytes
    - Click Count (0)
  4. tensorflow/c/c_api_experimental.h

    // `shape_inference::InferenceContext` constructor. Note the following:
    //   - The inputs of the `op` are not used for shape inference. So, it is
    //     OK to not have the inputs properly set in `op`. See `input_tensors`
    //     if you want shape inference to consider the input tensors of the
    //     op for shape inference.
    //   - The types need not be set in `input_shapes` as it is not used.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Thu Apr 27 21:07:00 GMT 2023
    - 15.1K bytes
    - Click Count (0)
  5. tensorflow/c/eager/c_api_unified_experimental.h

    // Represents a (partially-defined) shape.
    typedef struct TF_Shape {
      int num_dims;  // Must be >= -1; -1 represents unknown rank.
      int64_t* dim_sizes;
    } TF_Shape;
    
    // Add a new parameter to a TensorFlow Function.
    TF_AbstractTensor* TF_AddFunctionParameter(TF_ExecutionContext* func,
                                               TF_DataType dtype, TF_Shape shape,
                                               TF_Status* s);
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sun Oct 24 11:27:00 GMT 2021
    - 7K bytes
    - Click Count (0)
  6. tensorflow/c/c_api.h

    // setting a shape of [-1, 2] with an existing shape [2, -1] would set
    // a final shape of [2, 2] based on shape merging semantics.
    //
    // Returns an error into `status` if:
    //   * `output` is not in `graph`.
    //   * An invalid shape is being set (e.g., the shape being set
    //     is incompatible with the existing shape).
    TF_CAPI_EXPORT extern void TF_GraphSetTensorShape(TF_Graph* graph,
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Thu Oct 26 21:08:15 GMT 2023
    - 82.3K bytes
    - Click Count (0)
  7. tensorflow/c/c_test_util.cc

      TF_AddInput(desc, r);
      return TF_FinishOperation(desc, s);
    }
    
    TF_Operation* RandomUniform(TF_Operation* shape, TF_DataType dtype,
                                TF_Graph* graph, TF_Status* s) {
      TF_OperationDescription* desc =
          TF_NewOperation(graph, "RandomUniform", "random_uniform");
      TF_AddInput(desc, {shape, 0});
      TF_SetAttrType(desc, "dtype", dtype);
      return TF_FinishOperation(desc, s);
    }
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 04 05:55:32 GMT 2025
    - 17.8K bytes
    - Click Count (1)
  8. ci/official/utilities/rename_and_verify_wheels.sh

    fi
    if [[ "$TFCI_WHL_IMPORT_TEST_ENABLE" == "1" ]]; then
      "$python" -c 'import tensorflow as tf; t1=tf.constant([1,2,3,4]); t2=tf.constant([5,6,7,8]); print(tf.add(t1,t2).shape)'
      "$python" -c 'import sys; import tensorflow as tf; sys.exit(0 if "keras" in tf.keras.__name__ else 1)'
    fi
    # Import tf nightly wheel built with numpy2 from PyPI in numpy1 env for testing.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Mon Sep 22 21:39:32 GMT 2025
    - 4.4K bytes
    - Click Count (0)
  9. tensorflow/c/eager/c_api_test_util.h

    TFE_Op* MatMulOp(TFE_Context* ctx, TFE_TensorHandle* a, TFE_TensorHandle* b);
    
    // Return an identity op.
    TFE_Op* IdentityOp(TFE_Context* ctx, TFE_TensorHandle* a);
    
    // Return a shape op fetching the shape of `a`.
    TFE_Op* ShapeOp(TFE_Context* ctx, TFE_TensorHandle* a);
    
    // Return an allreduce op adding up input tensor `in` from `group_size` workers.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Mon Jul 17 23:43:59 GMT 2023
    - 7.7K bytes
    - Click Count (0)
  10. tensorflow/c/checkpoint_reader.h

      void GetTensor(const std::string& name,
                     std::unique_ptr<tensorflow::Tensor>* out_tensor,
                     TF_Status* out_status) const;
    
     private:
      // Uses "v2_reader_" to build "var name -> shape" and "var name -> data type"
      // maps; both owned by caller.
      // REQUIRES: "v2_reader_ != nullptr && v2_reader_.status().ok()".
      std::pair<std::unique_ptr<TensorSliceReader::VarToShapeMap>,
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Wed Jan 07 04:56:09 GMT 2026
    - 3.1K bytes
    - Click Count (0)
Back to Top