Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for AsTensor (0.24 sec)

  1. tensorflow/cc/framework/gradients_test.cc

      test::ExpectTensorEqual<int>(
          outputs[0],
          test::AsTensor<int>({40, 41, 42, 43, 44, 45, 46, 47}, {4, 2}));
      test::ExpectTensorEqual<int>(
          outputs[1],
          test::AsTensor<int>({50, 51, 52, 53, 55, 55, 56, 57}, {4, 2}));
      test::ExpectTensorEqual<int>(
          outputs[2],
          test::AsTensor<int>({60, 61, 62, 63, 66, 66, 66, 67}, {4, 2}));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 15 15:13:38 UTC 2023
    - 25K bytes
    - Viewed (0)
  2. tensorflow/cc/gradients/nn_grad_test.cc

      // Avoid input values where Leaky ReLU gradient is not well defined (around
      // zero).
      Tensor x_init_value = test::AsTensor<float>(
          {2.3f, 1.9f, 1.5f, 1.1f, 0.7f, 0.3f, -0.1f, -0.5f, -0.9f, -1.3f}, {5, 2});
      Tensor features = test::AsTensor<float>(
          {-0.9f, -0.7f, -0.5f, -0.3f, -0.1f, 0.1f, 0.3f, 0.5f, 0.7f, 0.9f},
          {5, 2});
      auto y = ops::internal::LeakyReluGrad(scope_, x, features);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 22 20:45:22 UTC 2022
    - 15K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/cc/save_variables_test.cc

      Tensor loaded_var_0{};
      EXPECT_TRUE(bundle_reader.Lookup("var_0", &loaded_var_0).ok());
      ExpectEqual(loaded_var_0, AsTensor<float>({1.0, 2.0}));
    
      Tensor loaded_var_1{};
      EXPECT_TRUE(bundle_reader.Lookup("var_1", &loaded_var_1).ok());
      ExpectEqual(loaded_var_1, AsTensor<int>({3, 4, 5, 6}));
    }
    
    TEST_F(SaveVariablesToCheckpointTest,
           NoVariablesSavedWhenNoInitializerFunction) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  4. tensorflow/cc/gradients/math_grad_test.cc

      auto y = Min(scope_, x, {-1});
      // y's shape is the result of reducing x along axes -1 (= 1)
      TensorShape y_shape({2});
      Tensor x_init_value =
          test::AsTensor<float>({0.5f, 0.7f, 0.2f, 1.0f, 1.5f, -2.8f}, x_shape);
      RunTest(x, x_init_value, y, y_shape);
    }
    
    TEST_F(NaryGradTest, Max) {
      TensorShape x_shape({2, 3});
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 25 18:20:20 UTC 2023
    - 36K bytes
    - Viewed (0)
  5. tensorflow/cc/saved_model/saved_model_bundle_test.cc

        Tensor input =
            test::AsTensor<tstring>(serialized_examples, TensorShape({4}));
        std::vector<Tensor> outputs;
        TF_ASSERT_OK(bundle.session->Run({{input_name, input}}, {output_name}, {},
                                         &outputs));
        ASSERT_EQ(outputs.size(), 1);
        test::ExpectTensorEqual<float>(
            outputs[0],
            test::AsTensor<float>({2, 2.5, 3, 3.5}, TensorShape({4, 1})));
      }
    };
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 15.3K bytes
    - Viewed (0)
Back to top