Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for float (0.12 sec)

  1. tensorflow/c/experimental/gradients/nn_grad_test.cc

      auto ReluGradModel = BuildGradModel(ReluModel, registry_);
    
      float X_vals[] = {1.0f, 2.0f, 3.0f, -5.0f, -4.0f, -3.0f, 2.0f, 10.0f, -1.0f};
      int64_t X_dims[] = {3, 3};
      AbstractTensorHandlePtr X;
      {
        AbstractTensorHandle* X_raw;
        status_ = TestTensorHandleWithDims<float, TF_FLOAT>(
            immediate_execution_ctx_.get(), X_vals, X_dims, 2, &X_raw);
    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

    TEST(CAPI, TestFromProto) {
      Tensor t_cc(DT_FLOAT, TensorShape({2, 3}));
      t_cc.flat<float>().setConstant(1.0);
      tensorflow::TensorProto t_proto;
      t_cc.AsProtoField(&t_proto);
    
      TF_Buffer* t_buffer = TF_NewBuffer();
      TF_CHECK_OK(MessageToBuffer(t_proto, t_buffer));
    
      const int num_bytes = 6 * sizeof(float);
      float* values =
          reinterpret_cast<float*>(tensorflow::cpu_allocator()->AllocateRaw(
    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/experimental/gradients/array_grad_test.cc

        status_ = TestScalarTensorHandle<float, TF_FLOAT>(
            immediate_execution_ctx_.get(), 1.0f, &x1_raw);
        ASSERT_EQ(errors::OK, status_.code()) << status_.message();
        x1.reset(x1_raw);
      }
    
      AbstractTensorHandlePtr x2;
      {
        AbstractTensorHandle* x2_raw = nullptr;
        status_ = TestScalarTensorHandle<float, TF_FLOAT>(
            immediate_execution_ctx_.get(), 1.0f, &x2_raw);
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  4. tensorflow/c/eager/unified_api_test.cc

        ctx.reset(ctx_raw);
      }
    
      AbstractTensorHandlePtr x;
      {
        AbstractTensorHandle* x_raw = nullptr;
        float data[] = {0., 0., 0., 0., 0., 0., 0., 0};
        int64_t dim_sizes[] = {2, 4};
        Status s = TestTensorHandleWithDims<float, TF_FLOAT>(ctx.get(), data,
                                                             dim_sizes, 2, &x_raw);
        ASSERT_EQ(errors::OK, s.code()) << s.message();
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_test_util.cc

    #include "tensorflow/core/util/port.h"
    
    using tensorflow::string;
    using tensorflow::tstring;
    
    TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value) {
      float data[] = {value};
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, nullptr, 0, status);
      memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, 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)
  6. tensorflow/c/experimental/gradients/grad_test_helper.cc

        ASSERT_EQ(num_elem_numerical, num_elem_analytical);
    
        float* dnumerical = new float[num_elem_numerical]{0};
        memcpy(&dnumerical[0], TF_TensorData(numerical_tensor),
               TF_TensorByteSize(numerical_tensor));
        float* danalytical = new float[num_elem_analytical]{0};
        memcpy(&danalytical[0], TF_TensorData(analytical_tensor),
               TF_TensorByteSize(analytical_tensor));
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  7. tensorflow/c/eager/dlpack.cc

              return absl::OkStatus();
            case 32:
              *tf_dtype = TF_DataType::TF_FLOAT;
              return absl::OkStatus();
            case 64:
              *tf_dtype = TF_DataType::TF_DOUBLE;
              return absl::OkStatus();
            default:
              return tensorflow::errors::InvalidArgument("Unsupported Float bits: ",
                                                         dtype.bits);
          }
          break;
    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)
  8. tensorflow/c/experimental/gradients/custom_gradient_test.cc

        ASSERT_EQ(errors::OK, s.code()) << s.message();
        ctx.reset(ctx_raw);
      }
    
      AbstractTensorHandlePtr x;
      {
        AbstractTensorHandle* x_raw = nullptr;
        Status s = TestScalarTensorHandle<float, TF_FLOAT>(ctx.get(), 1.0f, &x_raw);
        ASSERT_EQ(errors::OK, s.code()) << s.message();
        x.reset(x_raw);
      }
    
      // Pseudo-code:
      //
      // tape.watch(x)
      // y = exp(x)
      // outputs = tape.gradient(y, x)
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  9. tensorflow/c/eager/gradients.cc

    }
    Status SetAttrFloatList(AbstractOperation* op_, const char* attr_name,
                            const float* values, int num_values,
                            ForwardOperation* forward_op_) {
      forward_op_->attrs.Set(attr_name,
                             gtl::ArraySlice<const float>(values, num_values));
      return op_->SetAttrFloatList(attr_name, values, num_values);
    }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/gradients/BUILD

            "//tensorflow/c/experimental/ops:nn_ops",
            "//tensorflow/core:test",
            "//tensorflow/core:test_main",
            "//tensorflow/core/platform:tensor_float_32_utils",
        ] + if_libtpu(
            if_false = ["//tensorflow/compiler/mlir/tensorflow/c:mlir_c_api_registration"],
            if_true = [],
        ),
    )
    
    tf_cuda_cc_test(
        name = "math_grad_test",
    Plain Text
    - Registered: Tue Apr 09 12:39:09 GMT 2024
    - Last Modified: Mon Apr 01 20:39:44 GMT 2024
    - 6.7K bytes
    - Viewed (0)
Back to top