Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 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/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)
  3. tensorflow/c/eager/c_api_test_util.cc

      return th;
    }
    
    TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, int value) {
      int data[] = {value};
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_INT32, nullptr, 0, status);
      memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status);
      CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    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)
  4. tensorflow/c/eager/gradient_checker.cc

    namespace gradients {
    
    using namespace std;
    
    // ================== Helper functions =================
    
    // Fills data with values [start,end) with given step size.
    void Range(vector<int32_t>* data, int32_t start, int32_t end,
               int32_t step = 1) {
      for (int32_t i = start; i < end; i += step) {
        (*data)[i] = i;
      }
    }
    
    // Fills out_dims with the dimensions of the given tensor.
    void GetDims(const TF_Tensor* t, int64_t* out_dims) {
    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)
  5. tensorflow/c/eager/dlpack.cc

        case TF_DataType::TF_FLOAT:
        case TF_DataType::TF_DOUBLE:
          dtype.code = DLDataTypeCode::kDLFloat;
          break;
        case TF_DataType::TF_INT8:
        case TF_DataType::TF_INT16:
        case TF_DataType::TF_INT32:
        case TF_DataType::TF_INT64:
          dtype.code = DLDataTypeCode::kDLInt;
          break;
        case TF_DataType::TF_UINT8:
        case TF_DataType::TF_UINT16:
        case TF_DataType::TF_UINT32:
    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)
  6. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

      while (n > 0) {
        // Some platforms, notably macs, throw `EINVAL` if `pread` is asked to read
        // more than fits in a 32-bit integer.
        size_t requested_read_length;
        if (n > INT32_MAX)
          requested_read_length = INT32_MAX;
        else
          requested_read_length = n;
    
        // `pread` returns a `ssize_t` on POSIX, but due to interface being
        // cross-platform, return type of `Read` is `int64_t`.
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  7. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

    }
    
    std::unique_ptr<ParallelTensor> ParallelDevice::DeviceIDs(
        TFE_Context* context, TF_Status* status) const {
      std::vector<int32_t> ids;
      ids.reserve(num_underlying_devices());
      for (int i = 0; i < num_underlying_devices(); ++i) {
        ids.push_back(i);
      }
      return ScalarsFromSequence<int32_t>(ids, context, status);
    }
    
    absl::optional<std::vector<std::unique_ptr<ParallelTensor>>>
    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)
  8. RELEASE.md

            tf.TensorSpec([], dtypes.int32) ]) def _remote_multiply(a, b): return
            tf.math.multiply(a, b)
    
            server.register("multiply", _remote_multiply) ```
    
        *   Example usage to create client: `python client =
            tf.distribute.experimental.rpc.Client.create("grpc", address) a =
            tf.constant(2, dtype=tf.int32) b = tf.constant(3, dtype=tf.int32)
    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)
Back to top