Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,100 for Dtype (0.27 sec)

  1. tensorflow/c/eager/dlpack.cc

      owner->reference.Unref();
      delete owner;
    }
    
    // Converts TF_DATAType to DLPack data type.
    DLDataType GetDlDataType(TF_DataType data_type, TF_Status* status) {
      DLDataType dtype;
      dtype.lanes = 1;
      dtype.bits = TF_DataTypeSize(data_type) * 8;
      switch (data_type) {
        case TF_DataType::TF_BOOL:
          dtype.code = DLDataTypeCode::kDLBool;
          break;
        case TF_DataType::TF_HALF:
        case TF_DataType::TF_FLOAT:
    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)
  2. tensorflow/c/eager/parallel_device/parallel_device_lib.h

                     absl::Span<const int64_t> shape, const TF_DataType dtype)
          : device_(device),
            tensors_(std::move(tensors)),
            shape_(std::vector<int64_t>(shape.begin(), shape.end())),
            dtype_(dtype) {}
      ParallelTensor(const ParallelDevice& device,
                     std::vector<TensorHandlePtr> tensors, const TF_DataType dtype)
          : device_(device),
            tensors_(std::move(tensors)),
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Apr 25 15:21:13 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  3. tensorflow/c/c_test_util.cc

      }
      return found_dtype && found_shape;
    }
    
    bool IsScalarConst(const tensorflow::NodeDef& node_def, int v) {
      if (node_def.op() != "Const" || node_def.name() != "scalar") {
        return false;
      }
      bool found_dtype = false;
      bool found_value = false;
      for (const auto& attr : node_def.attr()) {
        if (attr.first == "dtype") {
          if (attr.second.type() == tensorflow::DT_INT32) {
            found_dtype = true;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  4. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

        }
        if (TFE_TensorHandleDataType(component.get()) != dtype) {
          TF_SetStatus(status, TF_INTERNAL,
                       "Components of a ParallelTensor must all have "
                       "the same dtype");
          return nullptr;
        }
      }
      return std::unique_ptr<ParallelTensor>(
          new ParallelTensor(parallel_device, std::move(components), shape, dtype));
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  5. tensorflow/c/c_api_experimental.cc

    }
    
    TFE_TensorHandle* TFE_NewTensorHandleFromScalar(TF_DataType data_type,
                                                    void* data, size_t len,
                                                    TF_Status* status) {
      auto dtype = static_cast<tensorflow::DataType>(data_type);
      DCHECK(tensorflow::DataTypeCanUseMemcpy(dtype));
    
      tensorflow::Tensor tensor(dtype, tensorflow::TensorShape({}));
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/gradients/math_grad.cc

      auto dtype = input->DataType();
      if (DataTypeIsFloating(BaseType(dtype)) ||
          DataTypeIsInteger(BaseType(dtype))) {
        return tensorflow::ops::Identity(ctx, input, output, name);
      } else if (!DataTypeIsComplex(BaseType(dtype)) &&
                 BaseType(dtype) != DT_VARIANT) {
        return errors::InvalidArgument(
            "Expected numeric or variant tensor, got dtype ", dtype);
      }
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  7. tensorflow/c/eager/tape.h

      // least one input of the op is watched and has trainable dtype.
      //
      // op_type is used to decide which of the incoming gradients can be left as
      // nullptr instead of building zeros when build_default_zeros_grads == true.
      void RecordOperation(
          const string& op_type, const std::vector<TapeTensor>& output_tensors,
          absl::Span<const int64_t> input_tensor_id,
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  8. tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc

          TFE_NewOp(context.get(), "VarHandleOp", status.get()), TFE_DeleteOp);
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      TFE_OpSetAttrType(handle_op.get(), "dtype", TF_FLOAT);
      TFE_OpSetAttrShape(handle_op.get(), "shape", /*dims=*/nullptr, /*num_dims=*/0,
                         status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      auto outputs =
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 15.3K bytes
    - Viewed (0)
  9. tensorflow/c/eager/custom_device_test.cc

          TFE_NewOp(context.get(), "VarHandleOp", status.get()), TFE_DeleteOp);
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      TFE_OpSetAttrType(op.get(), "dtype", TF_FLOAT);
      TFE_OpSetAttrShape(op.get(), "shape", {}, 0, status.get());
      TFE_OpSetAttrString(op.get(), "container", "", 0);
      TFE_OpSetAttrString(op.get(), "shared_name", "", 0);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 27 23:39:24 GMT 2020
    - 18.4K bytes
    - Viewed (0)
  10. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

    Variable* Variable::Create(TFE_Context* context, TF_DataType type,
                               const int64_t* dims, const int num_dims,
                               const char* device, TF_Status* status) {
      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> op(
          TFE_NewOp(context, "VarHandleOp", status), TFE_DeleteOp);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_OpSetAttrType(op.get(), "dtype", type);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
Back to top