Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 122 for shape (0.23 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 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  2. 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 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  3. 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 30 12:39:09 GMT 2024
    - Last Modified: Tue Apr 25 15:21:13 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  4. 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 30 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  5. 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 30 12:39:09 GMT 2024
    - Last Modified: Tue Jan 17 22:27:52 GMT 2023
    - 13.1K bytes
    - Viewed (1)
  6. tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc

      auto outputs = parallel_device.Join(
          /*expected_output_shapes=*/{PartialTensorShape({})}, status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      const std::vector<std::unique_ptr<ParallelTensor>>& handles = *outputs;
      const std::vector<int64_t>* shape;
      Status s = handles[0]->Shape(&shape);
      ASSERT_TRUE(s.ok());
      EXPECT_EQ(0, shape->size());
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 15.3K bytes
    - Viewed (0)
  7. tensorflow/c/c_api_experimental.h

    //     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.
    //   - The number of `input_tensors` should be the same as the number of items
    //     in `input_shapes`.
    //
    // The results are returned in `output_shapes` and
    // `output_resource_shapes_and_types`. The caller is responsible for freeing the
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 27 21:07:00 GMT 2023
    - 15.1K bytes
    - Viewed (0)
  8. tensorflow/c/eager/c_api_unified_experimental_graph.cc

        std::vector<PartialTensorShape> shapes;
        shapes.reserve(num_values);
        for (int i = 0; i < num_values; ++i) {
          if (num_dims[i] < 0) {
            shapes.emplace_back();
          } else {
            shapes.emplace_back(ArraySlice<int64_t>(
                reinterpret_cast<const int64_t*>(dims[i]), num_dims[i]));
          }
        }
        op_->node_builder.Attr(attr_name, shapes);
        return absl::OkStatus();
      }
    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/experimental/grappler/grappler_test.cc

          TF_ASSERT_OK(s);
    
          EXPECT_EQ(DT_FLOAT, in_props.dtype());
          EXPECT_FALSE(in_props.shape().unknown_rank());
          EXPECT_EQ(2, in_props.shape().dim_size());
          EXPECT_EQ(10, in_props.shape().dim(0).size());
          EXPECT_EQ(1, in_props.shape().dim(1).size());
    
          for (int i = 0; i < in_props_buf.size(); i++)
            TF_DeleteBuffer(in_props_buf[i]);
        }
      }
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Thu Apr 13 22:30:58 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  10. tensorflow/c/eager/dlpack.cc

      std::vector<int64_t>* shape_arr = &tf_dlm_tensor_ctx->shape;
      std::vector<int64_t>* stride_arr = &tf_dlm_tensor_ctx->strides;
      shape_arr->resize(ndim);
      stride_arr->resize(ndim, 1);
      for (int i = 0; i < ndim; i++) {
        (*shape_arr)[i] = tensor->dim_size(i);
      }
      for (int i = ndim - 2; i >= 0; --i) {
        (*stride_arr)[i] = (*shape_arr)[i + 1] * (*stride_arr)[i + 1];
      }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
Back to top