Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  3. 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)
  4. tensorflow/c/c_api.cc

                         float value) {
      desc->node_builder.Attr(attr_name, value);
    }
    
    void TF_SetAttrFloatList(TF_OperationDescription* desc, const char* attr_name,
                             const float* values, int num_values) {
      desc->node_builder.Attr(attr_name,
                              ArraySlice<const float>(values, num_values));
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. tensorflow/c/eager/c_api_unified_experimental.cc

    limitations under the License.
    ==============================================================================*/
    
    #include "tensorflow/c/eager/c_api_unified_experimental.h"
    
    #include <vector>
    
    #include "absl/container/flat_hash_map.h"
    #include "absl/strings/str_cat.h"
    #include "tensorflow/c/eager/c_api_unified_experimental_internal.h"
    #include "tensorflow/c/tf_datatype.h"
    #include "tensorflow/c/tf_status.h"
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  8. 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)
  9. tensorflow/c/eager/gradient_checker.cc

      GetDims(theta_tensor, theta_dims.data());
    
      // Initialize auxilary data structures.
      vector<float> thetaPlus_data(num_elems);
      vector<float> thetaMinus_data(num_elems);
      AbstractTensorHandle* f_outputs[1];
    
      // Numerical Grad Check
      for (int i = 0; i < num_elems; i++) {
        // Get relative epsilon value
        float epsilon = theta_data[i] == 0 ? 1e-4 : std::abs(theta_data[i] * 1e-4);
        AbstractTensorHandlePtr two_eps;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util_test.cc

    }
    
    TEST(TensorPjRtBufferUtilTest, GetPjRtCBufferFromTensorNoBuffer) {
      auto allocator = std::make_unique<AsyncValueAllocator>();
      tensorflow::Tensor tensor(allocator.get(), DT_FLOAT, {1});
    
      EXPECT_THAT(
          GetPjRtCBufferFromTensor(&tensor),
          StatusIs(error::INTERNAL, HasSubstr(absl::StrCat(
                                        "Input tensor does not have PjRtBuffer"))));
    }
    
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Mon Oct 30 19:20:20 GMT 2023
    - 7.2K bytes
    - Viewed (0)
Back to top