- Sort Score
- Num 10 results
- Language All
Results 1 - 5 of 5 for TestVariable (0.06 seconds)
-
tensorflow/c/eager/c_api_cluster_test.cc
const char dev1_name[] = "/job:localhost/replica:0/task:1/device:CPU:0"; TFE_TensorHandle* var_handle0 = TestVariable(ctx, 1.0, dev0_name); EXPECT_NE(var_handle0, nullptr); TFE_TensorHandle* var_handle1 = TestVariable(ctx, 2.0, dev1_name); EXPECT_NE(var_handle1, nullptr); TFE_TensorHandle* value_handle = nullptr; ReadVariable(ctx, var_handle1, &value_handle);
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Thu Oct 09 05:56:18 GMT 2025 - 19.2K bytes - Click Count (0) -
tensorflow/c/eager/c_api_distributed_test.cc
const char task2_name[] = "/job:localhost/replica:0/task:2/device:CPU:0"; // Create one variable per task. TFE_TensorHandle* h0 = TestVariable(ctx, 1.0, task1_name); TFE_TensorHandle* h1 = TestVariable(ctx, 2.0, task2_name); TFE_TensorHandle* h2 = TestVariable(ctx, 3.0, task0_name); // Add a sync point to make sure that variables have been initialized // before the function execution starts.
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Sat Oct 12 05:11:17 GMT 2024 - 23.4K bytes - Click Count (0) -
tensorflow/c/eager/c_api_test_util.h
TFE_TensorHandle* TestMatrixTensorHandle3X2(TFE_Context* ctx); // Return a variable handle referring to a variable with the given initial value // on the given device. TFE_TensorHandle* TestVariable(TFE_Context* ctx, float value, const tensorflow::string& device_name = ""); // Return an add op multiplying `a` by `b`. TFE_Op* AddOp(TFE_Context* ctx, TFE_TensorHandle* a, TFE_TensorHandle* b);
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Mon Jul 17 23:43:59 GMT 2023 - 7.7K bytes - Click Count (0) -
tensorflow/c/eager/c_api_test_util.cc
CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_DeleteTensor(t); TF_DeleteStatus(status); return th; } TFE_TensorHandle* TestVariable(TFE_Context* ctx, float value, const tensorflow::string& device_name) { TF_Status* status = TF_NewStatus(); // Create the variable handle.
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Thu Oct 09 05:56:18 GMT 2025 - 23.4K bytes - Click Count (0) -
tensorflow/c/eager/c_api_test.cc
TFE_Context* ctx = TFE_NewContext(opts, status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TFE_DeleteContextOptions(opts); TFE_TensorHandle* var_handle = TestVariable(ctx, 12.0); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TFE_Op* op = TFE_NewOp(ctx, "ReadVariableOp", status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Thu Oct 09 05:56:18 GMT 2025 - 94.6K bytes - Click Count (0)