- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for EXPECT_EQ (0.1 sec)
-
tensorflow/c/c_api_test.cc
ASSERT_TRUE(out != nullptr); EXPECT_EQ(TF_FLOAT, TF_TensorType(out)); EXPECT_EQ(2, TF_NumDims(out)); EXPECT_EQ(4, TF_Dim(out, 0)); EXPECT_EQ(1, TF_Dim(out, 1)); float* values = static_cast<float*>(TF_TensorData(out)); // These values are defined to be (input / 2) + 2. EXPECT_EQ(2, values[0]); EXPECT_EQ(2.5, values[1]); EXPECT_EQ(3, values[2]); EXPECT_EQ(3.5, values[3]);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0) -
tensorflow/c/eager/c_api_cluster_test.cc
std::unique_ptr<float[]> actual_values(new float[expected_values.size()]); EXPECT_EQ(sizeof(float) * expected_values.size(), TF_TensorByteSize(t)); memcpy(actual_values.get(), TF_TensorData(t), TF_TensorByteSize(t)); TF_DeleteTensor(t); for (int i = 0; i < expected_values.size(); i++) { EXPECT_EQ(expected_values[i], actual_values[i]) << "Mismatch in expected values at (zero-based) index " << i; }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.2K bytes - Viewed (0) -
tensorflow/c/eager/c_api_distributed_test.cc
ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); EXPECT_EQ(TFE_TensorHandleDataType(packed_handle), TF_RESOURCE); EXPECT_EQ(TFE_TensorHandleNumDims(packed_handle, status), 0); EXPECT_EQ(TFE_TensorHandleNumElements(packed_handle, status), 1); const string composite_device_name = "/job:localhost/replica:0/task:0/device:COMPOSITE:0"; EXPECT_EQ(TFE_TensorHandleDeviceName(packed_handle, status),
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 23.4K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc
const std::vector<std::unique_ptr<ParallelTensor>>& handles = *outputs; const std::vector<int64_t>* shape; absl::Status s = handles[0]->Shape(&shape); ASSERT_TRUE(s.ok()); EXPECT_EQ(0, shape->size()); } TEST(PARALLEL_DEVICE_LIB, TestCancelOnError) { std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status( TF_NewStatus(), TF_DeleteStatus);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 15.6K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_remote_test.cc
.ok()); ASSERT_TRUE(worker_server2->Start().ok()); TFE_ContextSetServerDef(context.get(), 0, serialized.data(), serialized.size(), status.get()); EXPECT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get()); BasicTestsForTwoDevices(context.get(), "/job:worker/replica:0/task:1/device:CPU:0",
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Jul 10 07:18:05 UTC 2024 - 6.8K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test_util.cc
TFE_Context* ctx = TFE_NewContext(opts, status); EXPECT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); TFE_ContextSetServerDefWithTimeout(ctx, 0, serialized_server_def.data(), serialized_server_def.size(), init_timeout_in_ms, status, /*clear_existing_contexts=*/false); EXPECT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_test.cc
// Copying on to a parallel device must be explicit. TensorHandlePtr failed_copy_on_result(TFE_TensorHandleCopyToDevice( cpu_value.get(), context.get(), device_name, status.get())); EXPECT_EQ(TF_GetCode(status.get()), TF_UNIMPLEMENTED); std::array<TFE_TensorHandle*, 2> components{cpu_value.get(), cpu_value.get()}; TensorHandlePtr device_value = CreatePerDeviceValues(
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Aug 06 23:56:17 UTC 2024 - 29.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get()); TF_Tensor* result_tensor = TFE_TensorHandleResolve(result_t, status.get()); float* result_value = static_cast<float*>(TF_TensorData(result_tensor)); EXPECT_EQ(*result_value, 4.0); TF_DeleteTensor(result_tensor); TF_DeleteAbstractTensor(result); TF_DeleteOutputList(o); TF_DeleteExecutionContext(ctx); } // MatMul Test
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 39.1K bytes - Viewed (0)