Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for num_dims (0.35 sec)

  1. tensorflow/c/eager/gradient_checker.cc

      // Will sum all dimensions, so get a Tensor containing [0,...,num_dims_out-1].
      AbstractTensorHandlePtr sum_dims;
      {
        vector<int32_t> vals(num_dims_out);
        int64_t vals_shape[] = {num_dims_out};
        Range(&vals, 0, num_dims_out);
        AbstractTensorHandle* sum_dims_raw = nullptr;
        TF_RETURN_IF_ERROR(TestTensorHandleWithDims<int32_t, TF_INT32>(
            ctx, vals.data(), vals_shape, 1, &sum_dims_raw));
        sum_dims.reset(sum_dims_raw);
      }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/gradients/tape/tape_operation.cc

                                           const int64_t** dims,
                                           const int* num_dims, int num_values) {
      std::unique_ptr<TensorShapeProto[]> proto(new TensorShapeProto[num_values]);
      for (int i = 0; i < num_values; ++i) {
        const auto num_dims_i = num_dims[i];
    
        if (num_dims_i > TensorShape::MaxDimensions()) {
          return errors::InvalidArgument(
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  3. tensorflow/c/c_api_experimental.cc

                                     const int64_t* dims, int num_dims) {
      DCHECK(index >= 0 && index < shape_list->num_items);
      TF_ShapeAndType& shape = shape_list->items[index];
      DCHECK(shape.dims == nullptr) << "Shape at " << index << " is already set!";
      DCHECK(num_dims >= 0) << "Number of dimensions cannot be negative!";
      shape.num_dims = num_dims;
      shape.dims = new int64_t[num_dims];
      memcpy(shape.dims, dims, sizeof(int64_t) * num_dims);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  4. tensorflow/c/eager/gradients.cc

                            const int64_t** dims, const int* num_dims,
                            int num_values, ForwardOperation* forward_op_) {
      std::unique_ptr<TensorShapeProto[]> proto(new TensorShapeProto[num_values]);
      for (int i = 0; i < num_values; ++i) {
        const auto num_dims_i = num_dims[i];
    
        if (num_dims_i > TensorShape::MaxDimensions()) {
          return errors::InvalidArgument(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/gradients/grad_test_helper.cc

      auto s = GetValue(t, &analytical_tensor);
      ASSERT_EQ(errors::OK, s.code()) << s.message();
    
      int64_t num_elem_analytical = 1;
      auto num_dims_analytical = TF_NumDims(analytical_tensor);
      ASSERT_EQ(dims.size(), num_dims_analytical);
      for (int j = 0; j < num_dims_analytical; j++) {
        auto dim_analytical = TF_Dim(analytical_tensor, j);
        ASSERT_EQ(dims[j], dim_analytical);
        num_elem_analytical *= dim_analytical;
      }
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  6. tensorflow/c/eager/c_api_test_util.h

                                                      int num_dims);
    
    // Get a Matrix TensorHandle with given float values and dimensions
    TFE_TensorHandle* TestTensorHandleWithDimsFloat(TFE_Context* ctx, float data[],
                                                    int64_t dims[], int num_dims);
    
    // Get a Matrix TensorHandle with given int values and dimensions
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Jul 17 23:43:59 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/gradients/tape/tape_operation.h

      Status SetAttrBool(const char* attr_name, bool value) override;
      Status SetAttrType(const char* attr_name, DataType value) override;
      Status SetAttrShape(const char* attr_name, const int64_t* dims,
                          const int num_dims) override;
      Status SetAttrFunction(const char* attr_name,
                             const AbstractOperation* value) override;
      Status SetAttrFunctionName(const char* attr_name, const char* value,
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 23 23:12:39 GMT 2020
    - 3.7K bytes
    - Viewed (1)
  8. tensorflow/c/eager/c_api_unified_experimental_graph.cc

        DCHECK(shape != nullptr);
        TF_Status status;
        int num_dims = TF_GraphGetTensorNumDims(graph_, output_, &status);
        DCHECK_GE(num_dims, -1);
        TF_RETURN_IF_ERROR(StatusFromTF_Status(&status));
        if (num_dims == kUnknownRank) {
          return absl::OkStatus();
        }
    
        std::vector<int64_t> dims(num_dims, kUnknownDim);
        TF_GraphGetTensorShape(graph_, output_,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
  9. 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)
  10. tensorflow/c/eager/c_api_unified_experimental_test.cc

      // Build an abstract input tensor.
      int64_t dims[] = {2, 2};  // Matrices will be 2 x 2
      int num_dims = sizeof(dims) / sizeof(dims[0]);
    
      float vals[] = {0.0f, 0.0f, 0.0f, 0.0f};
      TFE_Context* eager_ctx = TF_ExecutionContextGetTFEContext(ctx, status.get());
      TFE_TensorHandle* t =
          TestMatrixTensorHandleWithInput(eager_ctx, vals, dims, num_dims);
    
      TF_AbstractTensor* at = TF_CreateAbstractTensorFromEagerTensor(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 19 21:44:52 GMT 2023
    - 39.1K bytes
    - Viewed (0)
Back to top