Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,691 for expectGet (0.17 sec)

  1. 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: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 10:03:59 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/lite/quantize_weights_test.cc

            if (kUseUpdatedHybridSchemeDefault) {
              EXPECT_EQ(quant_tensor->quantization()->scale()->size(), shape[0]);
            } else {
              EXPECT_EQ(quant_tensor->quantization()->scale()->size(), 1);
            }
          } else {
            EXPECT_EQ(quant_tensor->type(), TensorType_FLOAT32);
          }
        }
        EXPECT_EQ(used_tensors.size(), quantized_graph->tensors()->size());
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 23:15:24 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api_experimental_test.cc

      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      float product[4] = {0};
      EXPECT_EQ(sizeof(product), TF_TensorByteSize(t));
      memcpy(&product[0], TF_TensorData(t), TF_TensorByteSize(t));
      TF_DeleteTensor(t);
      EXPECT_EQ(7, product[0]);
      EXPECT_EQ(10, product[1]);
      EXPECT_EQ(15, product[2]);
      EXPECT_EQ(22, product[3]);
      TF_DeleteStatus(status);
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 03 03:14:26 UTC 2023
    - 31.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/device_compiler_test.cc

      // persistent cache.
      std::vector<XlaJitCompilationActivity> activity_history =
          listener_->GetListenerHistory();
      EXPECT_EQ(activity_history.size(), 1);
      EXPECT_EQ(activity_history[0].cluster_name(), fn.name());
      EXPECT_EQ(activity_history[0].compile_count(), 1);
      EXPECT_FALSE(activity_history[0].used_persistent_cache());
    
      listener_->ClearListenerHistory();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/aot/codegen_test.cc

                    const std::vector<string>& want_namespaces) {
        string class_name;
        std::vector<string> namespaces;
        TF_EXPECT_OK(ParseCppClass(cpp_class, &class_name, &namespaces));
        EXPECT_EQ(class_name, want_class_name);
        EXPECT_EQ(namespaces, want_namespaces);
      }
    
      void ExpectFail(const string& cpp_class) {
        string class_name;
        std::vector<string> namespaces;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 01 02:13:40 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/xla_launch_util_gpu_test.cc

          GetVariableSnapshots(variables),
          /*pjrt_client=*/pjrt_client_, /*pjrt_device=*/*pjrt_device,
          /*use_pjrt_tensor_buffer=*/true, &exec_args,
          /*owned_args=*/{}, &non_donatable_input_indices));
    
      EXPECT_EQ(exec_args.size(), 2);
    
      std::shared_ptr<xla::Literal> literal1 = *exec_args[0]->ToLiteralSync();
      EXPECT_TRUE(xla::LiteralTestUtil::Equal(
          *literal1, xla::LiteralUtil::CreateR2<int32_t>({{1, 2, 3}})));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 10K bytes
    - Viewed (0)
  7. tensorflow/cc/experimental/libtf/tests/function_test.cc

            /*device=*/""}});
    }
    
    template <typename T>
    void ExpectEquals(AbstractTensorHandle* t, T expected) {
      TF_Tensor* result_t;
      Status s = tensorflow::GetValue(t, &result_t);
      ASSERT_TRUE(s.ok()) << s.message();
      auto value = static_cast<T*>(TF_TensorData(result_t));
      EXPECT_EQ(*value, expected);
      TF_DeleteTensor(result_t);
    }
    
    // TODO(srbs): Add tests for captures.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 21:44:52 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

    #include "tensorflow/core/platform/stacktrace_handler.h"
    #include "tensorflow/core/platform/test.h"
    
    #define ASSERT_TF_OK(x) ASSERT_EQ(TF_OK, TF_GetCode(x)) << TF_Message(x)
    #define EXPECT_TF_OK(x) EXPECT_EQ(TF_OK, TF_GetCode(x)) << TF_Message(x)
    
    static const char* content = "abcdefghijklmnopqrstuvwxyz1234567890";
    // We will work with content_view instead of content.
    static const absl::string_view content_view = content;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Aug 31 12:04:23 UTC 2020
    - 24.9K bytes
    - Viewed (0)
  9. tensorflow/cc/gradients/math_grad_test.cc

        TF_EXPECT_OK(
            session.Run({{x, {-3.0f, 0.0f, 3.0f}}}, grad_outputs, &grad_result));
        EXPECT_EQ(grad_result.size(), 1);
        EXPECT_EQ(grad_result[0].NumElements(), 3);
        EXPECT_EQ(grad_result[0].flat<float>()(0), 0.0f);
        EXPECT_EQ(grad_result[0].flat<float>()(1), 0.0f);
        EXPECT_EQ(grad_result[0].flat<float>()(2), 0.0f);
      }
    }
    
    TEST_F(NaryGradTest, SquaredDifference) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 25 18:20:20 UTC 2023
    - 36K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/build_xla_ops_pass_test.cc

      root.graph()->AddControlEdge(call, write_op);
    
      std::unique_ptr<Graph> graph;
      Status failure_status = BuildXlaOps(root, fdef_lib, &graph);
      ASSERT_FALSE(failure_status.ok());
      EXPECT_EQ(failure_status.code(), error::INVALID_ARGUMENT);
    }
    
    TEST_F(BuildXlaOpsTest, OnNonXlaDevice) {
      Scope root = Scope::NewRootScope().ExitOnError();
    
      FunctionDefLibrary fdef_lib =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 12.2K bytes
    - Viewed (0)
Back to top