Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 61 for Dtype (0.06 sec)

  1. tensorflow/compiler/jit/increase_dynamism_for_auto_jit_pass.cc

      std::vector<int64_t> size_as_vector;
    };
    
    std::vector<int64_t> IntTensorAsVector(const Tensor& t) {
      DCHECK(t.dtype() == DT_INT32 || t.dtype() == DT_INT64);
      std::vector<int64_t> result;
      result.reserve(t.NumElements());
      for (int i = 0; i < t.NumElements(); i++) {
        int64_t element = t.dtype() == DT_INT32
                              ? static_cast<int64_t>(t.flat<int32>()(i))
                              : t.flat<int64_t>()(i);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/xla_device_context.cc

          shape_determination_fns_.layout_preference_fn(
              device_tensor->shape(), device_tensor->dtype(), std::nullopt);
      Status status = [&]() -> Status {
        TF_ASSIGN_OR_RETURN(xla::Shape shape,
                            shape_determination_fns_.shape_representation_fn(
                                device_tensor->shape(), device_tensor->dtype(),
                                /*fast_mem=*/false, layout_preference));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 00:36:08 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_cluster_util_test.cc

      FunctionDef make_ref_float = FunctionDefHelper::Define(
          "RefFloatFn", {}, {"r:float"}, {},
          {{{"var"},
            "VariableV2",
            {},
            {{"dtype", DT_FLOAT}, {"shape", TensorShape({})}}},
           {{"r"}, "Identity", {"var"}, {{"T", DT_FLOAT}}}});
      *fdef_lib->add_function() = make_ref_float;
    }
    
    void AddRegularFunctionFunctionDef(FunctionDefLibrary* fdef_lib) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/next_pluggable_device/c_api.cc

      const tensorflow::Tensor& arg_tensor = cc_ctx->input(index);
      absl::Status cc_status;
      if (arg_tensor.dtype() != tensorflow::DT_RESOURCE) {
        cc_status = absl::InvalidArgumentError(
            absl::StrCat("Trying to obtain resource handle from Input[", index,
                         "], which is not type DT_RESOURCE."));
        status->status = cc_status;
        return nullptr;
      }
      const tensorflow::ResourceHandle& handle =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 05:48:24 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_test_util.cc

      TF_Status* status = TF_NewStatus();
      // Create the variable handle.
      TFE_Op* op = TFE_NewOp(ctx, "VarHandleOp", status);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_OpSetAttrType(op, "dtype", TF_FLOAT);
      TFE_OpSetAttrShape(op, "shape", {}, 0, status);
      TFE_OpSetAttrString(op, "container", "localhost", 0);
      TFE_OpSetAttrString(op, "shared_name", "", 0);
      if (!device_name.empty()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 22:37:46 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/saved_model/core/saved_model_utils.cc

      tensorflow::TensorShape shape(variable.shape());
      tensorflow::DataType dtype = variable.dtype();
      std::vector<std::string> component_devices;
    
      for (const auto& component :
           variable.experimental_distributed_variable_components()) {
        component_devices.push_back(component.device());
      }
    
      TF_RETURN_IF_ERROR(Variable::CreateUninitialized(
          ctx, dtype, shape, name,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 12 19:17:46 UTC 2023
    - 24K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/grappler/grappler_test.cc

          tensorflow::OpInfo::TensorProperties in_props;
          Status s = tensorflow::BufferToMessage(in_props_buf[0], &in_props);
          TF_ASSERT_OK(s);
    
          EXPECT_EQ(DT_FLOAT, in_props.dtype());
          EXPECT_FALSE(in_props.shape().unknown_rank());
          EXPECT_EQ(2, in_props.shape().dim_size());
          EXPECT_EQ(10, in_props.shape().dim(0).size());
          EXPECT_EQ(1, in_props.shape().dim(1).size());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 13 22:30:58 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  8. tensorflow/cc/framework/cc_op_gen_util.cc

      }
      strings::StrAppend(&ret, "}");
      return ret;
    }
    
    string PrintTensor(const TensorProto& tensor_proto) {
      Tensor t(tensor_proto.dtype());
      CHECK(t.FromProto(tensor_proto));
      const int64_t num_elts = t.NumElements();
      switch (t.dtype()) {
        case DT_FLOAT:
          return PrintArray(num_elts, t.flat<float>().data());
        case DT_DOUBLE:
          return PrintArray(num_elts, t.flat<double>().data());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 00:57:05 UTC 2024
    - 25K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

      }
    
      // Derive the output types. The result type is derived by using the
      // attributes attched to the result type of the signature. The attribute
      // value should be either in the attribute argument list or the derived
      // attribute from the input tensors. All the result type
      // are unranked, and shape inference should be applied afterwards.
      SmallVector<Type, 4> output_types;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api_experimental.cc

      }
    
      tensorflow::AbstractTensorInterface* t =
          tensorflow::unwrap(ctx)->CreateTensor(
              static_cast<tensorflow::DataType>(dtype), dimvec);
    
      if (t == nullptr) {
        status->status =
            tensorflow::errors::InvalidArgument("Unsupported dtype: ", dtype);
        return nullptr;
      }
    
      return new TF_Tensor{t};
    }
    
    TFE_TensorHandle* TFE_NewTensorHandleFromTensor(TFE_Context* ctx, TF_Tensor* t,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 11 23:52:39 UTC 2024
    - 35.9K bytes
    - Viewed (0)
Back to top