Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. tensorflow/c/c_api_experimental.cc

          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));
        }
      }
      if (output_shapes != nullptr) *output_shapes = output_shapes_result;
    
      // TODO(bgogul): Set output_resource_shapes_and_types.
    }
    
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/ops/array_ops.cc

    //   element. For example, if you have a single image of shape `[height, width,
    //   channels]`, you can make it a batch of 1 image with `expand_dims(image,
    //   0)`, which will make the shape `[1, height, width, channels]`.
    //
    //   Other examples:
    //
    //   ```
    //   # 't' is a tensor of shape [2]
    //   shape(expand_dims(t, 0)) ==> [1, 2]
    //   shape(expand_dims(t, 1)) ==> [2, 1]
    //   shape(expand_dims(t, -1)) ==> [2, 1]
    //
    C++
    - Registered: Tue Jan 23 12:39:08 GMT 2024
    - Last Modified: Tue May 10 19:11:36 GMT 2022
    - 6.7K bytes
    - Viewed (0)
  3. tensorflow/c/c_api.cc

          auto* out_shape_and_type = handle_data.add_shape_and_type();
          ic->ShapeHandleToProto(p.shape, out_shape_and_type->mutable_shape());
          out_shape_and_type->set_dtype(p.dtype);
          *out_shape_and_type->mutable_type() = p.type;
        }
      }
      string str_data;
      handle_data.SerializeToString(&str_data);
    
      TF_Buffer* result = TF_NewBufferFromString(str_data.c_str(), str_data.size());
      return result;
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  4. tensorflow/c/eager/parallel_device/parallel_device_lib.h

      // devices of a ParallelDevice. If called, ParallelTensor::Shape inspects
      // `components` to determine a shape.
      static std::unique_ptr<ParallelTensor> FromTensorHandles(
          const ParallelDevice& parallel_device,
          std::vector<TensorHandlePtr> components, TF_Status* status);
      // Uses the provided shape without additional checks, which avoids blocking
      // when ParallelTensor::Shape is called.
    C
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Tue Apr 25 15:21:13 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  5. fastapi/_compat.py

        sequence_shapes = {
            SHAPE_LIST,
            SHAPE_SET,
            SHAPE_FROZENSET,
            SHAPE_TUPLE,
            SHAPE_SEQUENCE,
            SHAPE_TUPLE_ELLIPSIS,
        }
        sequence_shape_to_type = {
            SHAPE_LIST: list,
            SHAPE_SET: set,
            SHAPE_TUPLE: tuple,
            SHAPE_SEQUENCE: list,
            SHAPE_TUPLE_ELLIPSIS: list,
        }
    
        @dataclass
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  6. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

          if (combined_shape.dims() < 0 ||
              combined_shape.dims() != component_shape.dims()) {
            PartialTensorShape first_shape;
            TF_RETURN_IF_ERROR(unwrap(tensors_[0].get())->Shape(&first_shape));
            return errors::Unimplemented(absl::StrCat(
                "Computing the shape of a ParallelTensor when the components do "
                "not all have the same rank is not supported. One tensor had "
                "shape ",
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  7. tensorflow/c/c_api_experimental_test.cc

                        /*input_tensors*/ {},
                        /*expected_shape*/ make_shape({3, kUnknownDim}));
    
      // Infer shape when some dimensions are unknown.
      CheckOutputShapes(
          matmul_op,
          /*input_shapes*/ {make_shape({kUnknownDim, 2}), make_shape({2, 4})},
          /*input_tensors*/ {},
          /*expected_shape*/ make_shape({kUnknownDim, 4}));
    
      // Infer shape when everything is unknown.
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Tue Jan 17 22:27:52 GMT 2023
    - 13.1K bytes
    - Viewed (1)
  8. 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 16 12:39:09 GMT 2024
    - Last Modified: Fri Jun 30 03:04:46 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  9. 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 16 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  10. 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 16 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 2.1K bytes
    - Viewed (0)
Back to top