Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for element (0.33 sec)

  1. tensorflow/c/c_api_test.cc

      const int num_dims = 2;
      int64_t* dims = new int64_t[num_dims];
      int64_t num_elements = 1;
      dims[0] = batch_size;
      dims[1] = 1;
      for (int64_t i = 0; i < num_dims; ++i) {
        num_elements *= dims[i];
      }
      TF_Tensor* t = TF_AllocateTensor(TF_STRING, dims, num_dims,
                                       sizeof(TF_TString) * num_elements);
      delete[] dims;
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  2. tensorflow/c/eager/tape.h

      // once) and produces the gradient of the target tensors with respect to the
      // source tensors. The output gradients are used if not empty and not
      // null. The result is populated with one tensor per target element.
      // When running backward functions, builds zeros-like tensors for
      // incoming grads which are nullptrs, unless `build_default_zeros_grads`
      // is set to false.
      Status ComputeGradient(
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  3. RELEASE.md

        *   Changing `tf.data.experimental.save` to store the type specification of
            the dataset elements. This avoids the need for explicitly specifying the
            `element_spec` argument of `tf.data.experimental.load` when loading the
            previously saved dataset.
        *   Add `.element_spec` property to `tf.data.DatasetSpec` to access the
            inner spec. This can be used to extract the structure of nested
    Plain Text
    - Registered: Tue May 07 12:40:20 GMT 2024
    - Last Modified: Mon Apr 29 19:17:57 GMT 2024
    - 727.7K bytes
    - Viewed (8)
  4. tensorflow/c/c_api.cc

      shapes.resize(num_shapes);
      for (int i = 0; i < num_shapes; ++i) {
        if (proto_lens[i] > std::numeric_limits<int>::max()) {
          status->status = InvalidArgument(
              "length of element ", i, " in the list (", proto_lens[i],
              " bytes) is too large to be parsed by the protocol buffer library");
          return;
        }
        if (!shapes[i].ParseFromArray(protos[i], static_cast<int>(proto_lens[i]))) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  5. tensorflow/c/eager/gradients.cc

    class TapeVSpace
        : public eager::VSpace<AbstractTensorHandle, GradientFunction, TapeTensor> {
     public:
      explicit TapeVSpace(AbstractContext* ctx) : ctx_(ctx) {}
      ~TapeVSpace() override {}
    
      // Returns the number of elements in the gradient tensor.
      int64_t NumElements(AbstractTensorHandle* tensor) const override;
    
      // Consumes references to the tensors in the gradient_tensors list and returns
      // a tensor with the result.
    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)
  6. tensorflow/c/eager/c_api_test_util.cc

      return th;
    }
    
    TFE_TensorHandle* TestMatrixTensorHandle100x100(TFE_Context* ctx) {
      constexpr int64_t dims[] = {100, 100};
      constexpr int num_elements = dims[0] * dims[1];
      float data[num_elements];
      for (int i = 0; i < num_elements; ++i) {
        data[i] = 1.0f;
      }
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, &dims[0],
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
  7. tensorflow/c/eager/c_api.cc

      if (h == nullptr) {
        status->status = tensorflow::errors::InvalidArgument("Invalid handle");
        return -1;
      }
    
      int64_t num_elements = -1;
      status->status = tensorflow::unwrap(h)->NumElements(&num_elements);
      return num_elements;
    }
    
    int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, int dim_index,
                                TF_Status* status) {
      if (h == nullptr) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  8. tensorflow/c/c_api_experimental.cc

      std::vector<Tensor> all_input_tensors;
      // Update the vector with information from `input_tensors` if provided.
      if (input_tensors != nullptr) {
        // Note that we take the address of the elements in `all_input_tensors`
        // below. Allocate enough space so that no reallocation happens, which will
        // make the pointers invalid.
        all_input_tensors.reserve(num_inputs);
        for (int i = 0; i < num_inputs; ++i) {
    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)
  9. tensorflow/c/eager/gradient_checker.cc

      // Convert from AbstractTensor to TF_Tensor.
      TF_Tensor* theta_tensor;
      TF_RETURN_IF_ERROR(GetValue(theta, &theta_tensor));
    
      // Get number of elements and fill data.
      int num_elems = TF_TensorElementCount(theta_tensor);
      vector<float> theta_data(num_elems);
      memcpy(theta_data.data(), TF_TensorData(theta_tensor),
             TF_TensorByteSize(theta_tensor));
    
    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)
Back to top