Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for float (0.16 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/eager/c_api_unified_experimental_test.cc

          TF_AbstractTensorGetEagerTensor(result, status.get());
      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);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri May 19 21:44:52 GMT 2023
    - 39.1K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api_test.cc

      ASSERT_EQ(1, num_retvals);
      EXPECT_EQ(TF_FLOAT, TFE_TensorHandleDataType(value_handle));
      EXPECT_EQ(0, TFE_TensorHandleNumDims(value_handle, status));
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      float value = 0.0f;
      TF_Tensor* t = TFE_TensorHandleResolve(value_handle, status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      ASSERT_EQ(sizeof(float), TF_TensorByteSize(t));
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
  5. tensorflow/c/eager/c_api_experimental_test.cc

        TF_Tensor* resolved = TFE_TensorHandleResolve(on_host, status);
        CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
        const float* resolved_data =
            static_cast<const float*>(TF_TensorData(resolved));
        EXPECT_EQ(0, memcmp(m_float, resolved_data, 4 * sizeof(float)));
        TF_DeleteTensor(resolved);
        TFE_DeleteTensorHandle(copy_aliased);  // Note that this will delete copy.
        TFE_DeleteTensorHandle(on_host);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  6. tensorflow/c/eager/dlpack_test.cc

          } else {
            EXPECT_EQ(dltensor_out->strides[i],
                      dltensor_out->shape[i + 1] * dltensor_out->strides[i + 1]);
          }
        }
      }
      const float* data_in = static_cast<const float*>(dltensor_in->data);
      const float* data_out = static_cast<const float*>(dltensor_out->data);
      for (size_t j = 0; j < num_elements; ++j) {
        EXPECT_EQ(data_out[j], data_in[j]);
      }
    
      TFE_CallDLManagedTensorDeleter(dlm_out);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Jun 30 03:04:46 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/gradients/tape/tape_operation.cc

    }
    Status TapeOperation::SetAttrFloatList(const char* attr_name,
                                           const float* values, int num_values) {
      forward_op_.attrs.Set(attr_name,
                            gtl::ArraySlice<const float>(values, num_values));
      return parent_op_->SetAttrFloatList(attr_name, values, num_values);
    }
    Status TapeOperation::SetAttrIntList(const char* attr_name,
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  8. tensorflow/c/eager/abstract_op_attrs.h

      virtual void GetNameAttrList(
          tensorflow::NameAttrList* name_and_attrs) const = 0;
    
      virtual bool GetInt(absl::string_view, int64_t* result) const = 0;
      virtual bool GetFloat(absl::string_view attr_name, float* result) const = 0;
      virtual bool GetBool(absl::string_view attr_name, bool* result) const = 0;
      virtual bool GetType(absl::string_view attr_name, DataType* result) const = 0;
      virtual Status GetTypeList(
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed May 26 22:20:27 GMT 2021
    - 2K bytes
    - Viewed (0)
  9. tensorflow/c/eager/abstract_operation.h

                                   size_t length) = 0;
      virtual Status SetAttrInt(const char* attr_name, int64_t value) = 0;
      virtual Status SetAttrFloat(const char* attr_name, float value) = 0;
      virtual Status SetAttrBool(const char* attr_name, bool value) = 0;
      virtual Status SetAttrType(const char* attr_name, DataType value) = 0;
      virtual Status SetAttrShape(const char* attr_name, const int64_t* dims,
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Jul 14 16:20:41 GMT 2021
    - 6.8K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/gradients/grad_test_helper.h

        Model model, Model grad_model, AbstractContext* ctx,
        absl::Span<AbstractTensorHandle* const> inputs, bool use_function,
        double abs_error = 1e-2);
    
    void CheckTensorValue(AbstractTensorHandle* t, absl::Span<const float> manuals,
                          absl::Span<const int64_t> dims, double abs_error = 1e-2);
    
    Model BuildGradModel(Model forward, GradientRegistry registry);
    
    }  // namespace internal
    }  // namespace gradients
    C
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Thu Jan 14 20:36:51 GMT 2021
    - 1.5K bytes
    - Viewed (0)
Back to top