Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 131 for shape (0.15 sec)

  1. tensorflow/c/eager/dlpack_test.cc

      dltensor_in->device = {kDLCPU, 0};
      dltensor_in->ndim = static_cast<int32_t>(shape.size());
      dltensor_in->dtype = {kDLFloat, 32, 1};
      dltensor_in->shape = shape.data();
      dltensor_in->strides = strides.data();
      TFE_TensorHandle* handle = TFE_HandleFromDLPack(&dlm_in, status, ctx);
      ASSERT_NE(handle, nullptr)
          << TF_Message(status) << " (shape=[" << absl::StrJoin(shape, ",")
          << "], strides=[" << absl::StrJoin(strides, ",") << "])";
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Jun 30 03:04:46 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  2. tensorflow/c/eager/abstract_tensor_handle.cc

    namespace tensorflow {
    
    std::string AbstractTensorHandle::DebugString() const {
      PartialTensorShape shape;
      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()),
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api_unified_experimental.cc

        return nullptr;
      }
      tensorflow::PartialTensorShape partial_shape;
      if (shape.num_dims != -1) {
        DCHECK(shape.dim_sizes != nullptr);
        Status status = tensorflow::PartialTensorShape::MakePartialShape(
            reinterpret_cast<int64_t*>(shape.dim_sizes), shape.num_dims,
            &partial_shape);
        if (!status.ok()) {
          tsl::Set_TF_Status_from_Status(s, status);
          return nullptr;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util_test.cc

      auto c_api_client = down_cast<xla::PjRtCApiClient*>(pjrt_client->get());
      std::vector<int32_t> data(1, 0);
      xla::Shape shape = xla::ShapeUtil::MakeShape(xla::S32, {1});
    
      auto buffer = c_api_client->pjrt_c_client()->client->BufferFromHostBuffer(
          data.data(), shape.element_type(), shape.dimensions(),
          /*byte_strides=*/std::nullopt,
          xla::PjRtClient::HostBufferSemantics::kImmutableOnlyDuringCall, nullptr,
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Mon Oct 30 19:20:20 GMT 2023
    - 7.2K bytes
    - Viewed (0)
  5. 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()) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Aug 25 21:29:12 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  6. 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" {
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  7. 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>";
      }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  8. tensorflow/c/eager/abstract_operation.h

    // fastbuild.
    inline Status AbstractOperation::SetAttrShape(const char* attr_name,
                                                  const PartialTensorShape shape) {
      return SetAttrShape(attr_name, shape.dim_sizes().data(), shape.dims());
    }
    
    inline Status AbstractOperation::SetAttrStringList(
        const char* attr_name, absl::Span<string const> values) {
      std::vector<const char*> raw_strs;
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Jul 14 16:20:41 GMT 2021
    - 6.8K bytes
    - Viewed (0)
  9. tensorflow/c/eager/unified_api_test.cc

                           absl::Span<AbstractTensorHandle*> outputs) {
      PartialTensorShape shape;
      TF_RETURN_IF_ERROR(inputs[0]->Shape(&shape));
      if (shape.dims() != 0) {
        return errors::InvalidArgument(
            "Tensor expected to have scalar shape found rank: ", shape.dims());
      }
      return absl::OkStatus();
    }
    
    TEST_P(UnifiedAPI, TestTensorShapeScalar) {
      if (UseFunction() && UseMlir()) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  10. tensorflow/c/checkpoint_reader.h

    #ifndef TENSORFLOW_C_CHECKPOINT_READER_H_
    #define TENSORFLOW_C_CHECKPOINT_READER_H_
    
    #include <memory>
    #include <string>
    
    #include "tensorflow/c/tf_status_helper.h"
    #include "tensorflow/core/framework/tensor_shape.h"
    #include "tensorflow/core/platform/status.h"
    #include "tensorflow/core/platform/types.h"
    #include "tensorflow/core/util/tensor_bundle/tensor_bundle.h"
    #include "tensorflow/core/util/tensor_slice_reader.h"
    
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Oct 12 08:49:52 GMT 2023
    - 3.1K bytes
    - Viewed (0)
Back to top