Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for Int32 (0.18 sec)

  1. tensorflow/c/experimental/gradients/nn_grad_test.cc

        ASSERT_EQ(errors::OK, status_.code()) << status_.message();
        X.reset(X_raw);
      }
      // Label
      int32_t Y_vals[] = {1, 0, 1};
      int64_t Y_dims[] = {3};
      AbstractTensorHandlePtr Y;
      {
        AbstractTensorHandle* Y_raw;
        status_ = TestTensorHandleWithDims<int32_t, TF_INT32>(
            immediate_execution_ctx_.get(), Y_vals, Y_dims, 1, &Y_raw);
        ASSERT_EQ(errors::OK, status_.code()) << status_.message();
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  2. tensorflow/c/eager/c_api_experimental_test.cc

        TFE_ContextSetExecutorForThread(ctx, executor);
        CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
        TF_Tensor* t =
            TF_AllocateTensor(TF_INT32, nullptr, 0, 1 * sizeof(tensorflow::int32));
        *reinterpret_cast<tensorflow::int32*>(TF_TensorData(t)) = 42;
        TFE_TensorHandle* h = TFE_NewTensorHandle(t, status);
        ASSERT_TRUE(TF_GetCode(status) == TF_OK) << TF_Message(status);
        TF_DeleteTensor(t);
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  3. tensorflow/c/c_api_test.cc

      TF_Tensor* out = csession.output_tensor(0);
      ASSERT_TRUE(out != nullptr);
      EXPECT_EQ(TF_INT32, TF_TensorType(out));
      EXPECT_EQ(0, TF_NumDims(out));  // scalar
      ASSERT_EQ(sizeof(int32), TF_TensorByteSize(out));
      int32* output_contents = static_cast<int32*>(TF_TensorData(out));
      EXPECT_EQ(3 + 2, *output_contents);
    
      // Add another operation to the graph.
    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)
  4. tensorflow/c/c_test_util.cc

                           const int32_t* values) {
      int64_t num_values = 1;
      for (int i = 0; i < num_dims; ++i) {
        num_values *= dims[i];
      }
      TF_Tensor* t =
          TF_AllocateTensor(TF_INT32, dims, num_dims, sizeof(int32_t) * num_values);
      memcpy(TF_TensorData(t), values, sizeof(int32_t) * num_values);
      return t;
    }
    
    TF_Tensor* Int32Tensor(const std::vector<int32_t>& values) {
      int64_t dims = values.size();
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  5. tensorflow/c/c_test_util.h

        unique_tensor_ptr;
    
    TF_Tensor* BoolTensor(int32_t v);
    
    // Create a tensor with values of type TF_INT8 provided by `values`.
    TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values);
    
    // Create a tensor with values of type TF_INT32 provided by `values`.
    TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims,
                           const int32_t* values);
    
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 09 01:06:53 GMT 2018
    - 6K bytes
    - Viewed (0)
  6. tensorflow/c/eager/dlpack_test.cc

                              std::vector<int64_t> shape,
                              std::vector<int64_t> strides) {
      size_t num_elements = 1;
      for (int i = 0; i < static_cast<int32_t>(shape.size()); ++i) {
        num_elements *= shape[i];
      }
      std::vector<float> data(num_elements);
      for (size_t j = 0; j < num_elements; ++j) {
        data[j] = j;
      }
      DLManagedTensor dlm_in = {};
    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)
  7. tensorflow/c/c_api_function_test.cc

          ASSERT_TRUE(out != nullptr);
          EXPECT_EQ(TF_INT32, TF_TensorType(out));
          EXPECT_EQ(0, TF_NumDims(out));  // scalar
          ASSERT_EQ(sizeof(int32_t), TF_TensorByteSize(out));
          int32_t* output_contents = static_cast<int32_t*>(TF_TensorData(out));
          EXPECT_EQ(expected_results[i], *output_contents);
        }
      }
    
      void CompareInt32Tensor(const std::vector<int32_t>& expected, TF_Tensor* t) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 20 22:08:54 GMT 2023
    - 63.6K bytes
    - Viewed (6)
  8. tensorflow/c/eager/c_api_test.cc

      EXPECT_EQ(attr_found->second.type(), tensorflow::DataType::DT_FLOAT);
      attr_found = attr_values.find("Tidx");
      EXPECT_NE(attr_found, attr_values.cend());
      EXPECT_EQ(attr_found->second.type(), tensorflow::DataType::DT_INT32);
    
      TFE_TensorHandle* retvals[1] = {nullptr};
      int num_retvals = 1;
      TFE_Execute(minOp, &retvals[0], &num_retvals, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
  9. tensorflow/c/experimental/grappler/grappler.h

    typedef struct TP_OptimizerRegistrationParams {
      size_t struct_size;
      void* ext;  // reserved for future use
    
      // Graph C API version.
      int32_t major_version;
      int32_t minor_version;
      int32_t patch_version;
    
      // Backend device type supported by the optimizer.
      const char* device_type;
      TP_OptimizerConfigs* optimizer_configs;  // output, set by plugin
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Aug 03 18:08:43 GMT 2022
    - 12.5K bytes
    - Viewed (0)
  10. tensorflow/c/eager/immediate_execution_context.h

      // will be blocked till the copy completes. This is the default policy.
      DEVICE_PLACEMENT_SILENT = 2,
      // Placement policy which silently copies int32 tensors but not other dtypes.
      DEVICE_PLACEMENT_SILENT_FOR_INT32 = 3,
    };
    // LINT.ThenChange(//tensorflow/c/eager/c_api.h)
    
    // Abstract interface to a context.
    //
    // A context is responsible for creating key objects such as Tensors,
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 06 08:34:00 GMT 2023
    - 12.3K bytes
    - Viewed (0)
Back to top