Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 41 for Shape (0.02 seconds)

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

  1. tensorflow/c/eager/c_api_debug.cc

      std::vector<int64_t> shape;
      int rank = -1;
      *status = handle.NumDims(&rank);
      if (!status->ok()) {
        return shape;
      }
      shape.reserve(rank);
      for (int i = 0; i < rank; ++i) {
        int64_t dim;
        *status = handle.Dim(i, &dim);
        if (!status->ok()) {
          return shape;
        }
        shape.push_back(dim);
      }
      return shape;
    }
    
    }  // namespace
    
    extern "C" {
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 2.5K bytes
    - Click Count (0)
  2. tensorflow/c/eager/abstract_tensor_handle.h

      virtual absl::Status TensorHandleStatus() const;
    
      // Returns tensor shape. If tensor has unknown rank, shape remains untouched.
      virtual absl::Status Shape(tensorflow::PartialTensorShape* shape) const = 0;
    
      // Returns tensor (full) type.
      // While there is no immediate plan to deprecate dtype and shape in favor
      // of only using full type type information, this is a future possibility.
      //
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 3K bytes
    - Click Count (0)
  3. tensorflow/c/c_api_experimental_test.cc

      CHECK_EQ(TF_OK, TF_GetCode(status_)) << TF_Message(status_);
    
      // Infer shape when everything is known.
      CheckOutputShapes(matmul_op,
                        /*input_shapes*/ {make_shape({3, 2}), make_shape({2, 4})},
                        /*input_tensors*/ {},
                        /*expected_shape*/ make_shape({3, 4}));
    
      // Infer shape when second operand has unknown shape.
      CheckOutputShapes(matmul_op,
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Wed Jan 07 04:56:09 GMT 2026
    - 13.1K bytes
    - Click Count (0)
  4. tensorflow/c/c_api.cc

    }
    
    // Create an empty tensor of type 'dtype'. 'shape' can be arbitrary, but has to
    // result in a zero-sized tensor.
    static TF_Tensor* EmptyTensor(TF_DataType dtype,
                                  const tensorflow::TensorShape& shape) {
      static char empty;
      int64_t nelems = 1;
      std::vector<int64_t> dims;
      dims.reserve(shape.dims());
      for (int i = 0; i < shape.dims(); ++i) {
        dims.push_back(shape.dim_size(i));
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 04 05:55:32 GMT 2025
    - 102.4K bytes
    - Click Count (0)
  5. tensorflow/c/eager/abstract_tensor_handle.cc

    namespace tensorflow {
    
    std::string AbstractTensorHandle::DebugString() const {
      PartialTensorShape shape;
      absl::Status s = Shape(&shape);
      std::string shape_string;
      if (!s.ok()) {
        shape_string = "<error computing shape>";
      } else {
        shape_string = shape.DebugString();
      }
      return absl::StrCat("TensorHandle(shape=", shape_string,
                          ", dtype=", DataType_Name(DataType()),
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 1.4K bytes
    - Click Count (0)
  6. tensorflow/c/eager/immediate_execution_tensor_handle.cc

    namespace tensorflow {
    
    std::string ImmediateExecutionTensorHandle::DebugString() const {
      PartialTensorShape shape;
      std::string shape_string;
      if (Shape(&shape).ok()) {
        shape_string = shape.DebugString();
      } else {
        shape_string = "<error computing shape>";
      }
      std::string value_string;
      if (!SummarizeValue(value_string).ok()) {
        value_string = "<error computing value>";
      }
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:24:07 GMT 2024
    - 2.1K bytes
    - Click Count (0)
  7. tensorflow/c/eager/dlpack.cc

    // original framework of destruction, and this context will be deleted also.
    struct TfDlManagedTensorCtx {
      TensorReference reference;
      std::vector<int64_t> shape;
      std::vector<int64_t> strides;
      DLManagedTensor tensor;
    
      explicit TfDlManagedTensorCtx(const TensorReference& ref) : reference(ref) {}
    };
    
    // Gets tensor from eager tensor handle.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Thu Mar 13 23:41:52 GMT 2025
    - 13K bytes
    - Click Count (0)
  8. tensorflow/c/checkpoint_reader.cc

      if (reader_ != nullptr) {
        status = reader_->GetTensor(name, out_tensor);
      } else {
        tensorflow::DataType dtype;
        tensorflow::TensorShape shape;
        status = v2_reader_->LookupDtypeAndShape(name, &dtype, &shape);
        if (status.ok()) {
          out_tensor->reset(new Tensor(dtype, shape));
          status = v2_reader_->Lookup(name, out_tensor->get());
          if (!status.ok()) out_tensor->reset();
        }
      }
      if (!status.ok()) {
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Tue Feb 17 18:49:14 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  9. tensorflow/c/eager/abstract_operation.h

    // TODO(b/193656009): Defining these in a cc file causes linker errors with
    // fastbuild.
    inline absl::Status AbstractOperation::SetAttrShape(
        const char* attr_name, const PartialTensorShape shape) {
      return SetAttrShape(attr_name, shape.dim_sizes().data(), shape.dims());
    }
    
    inline absl::Status AbstractOperation::SetAttrStringList(
        const char* attr_name, absl::Span<string const> values) {
      std::vector<const char*> raw_strs;
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 7.3K bytes
    - Click Count (0)
  10. 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)
Back to Top