Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for if (0.15 sec)

  1. tensorflow/c/c_api.cc

              } else if (typestr == "list(float)") {
                metadata.type = TF_ATTR_FLOAT;
              } else if (typestr == "list(bool)") {
                metadata.type = TF_ATTR_BOOL;
              } else if (typestr == "list(type)") {
                metadata.type = TF_ATTR_TYPE;
              } else if (typestr == "list(shape)") {
                metadata.type = TF_ATTR_SHAPE;
              } else if (typestr == "list(tensor)") {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/gradients/nn_grad.cc

        // Calculate Grad
        std::string name = "relu_grad";
        TF_RETURN_IF_ERROR(ReluGrad(ctx, upstream_grad, activations,
                                    &grad_inputs[0], name.c_str()));
        return absl::OkStatus();
      }
      ~ReluGradientFunction() override {
        for (auto output : forward_outputs_) {
          if (output) {
            output->Unref();
          }
        }
      }
    
     private:
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api_unified_experimental.cc

      TracingContext* tracing_ctx = dyn_cast<TracingContext>(unwrap(func));
      if (!tracing_ctx) {
        tsl::Set_TF_Status_from_Status(
            s, tensorflow::errors::InvalidArgument(
                   "TF_AddFunctionParameter must be called on a TracingContext."));
        return nullptr;
      }
      tensorflow::PartialTensorShape partial_shape;
      if (shape.num_dims != -1) {
        DCHECK(shape.dim_sizes != nullptr);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  4. tensorflow/c/eager/dlpack_test.cc

      EXPECT_EQ(dltensor_out->dtype.lanes, dltensor_in->dtype.lanes);
      for (int i = 0; i < dltensor_in->ndim; ++i) {
        EXPECT_EQ(dltensor_out->shape[i], dltensor_in->shape[i]);
        if (dltensor_out->strides) {
          if (i == dltensor_in->ndim - 1) {
            EXPECT_EQ(dltensor_out->strides[i], 1);
          } else {
            EXPECT_EQ(dltensor_out->strides[i],
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Jun 30 03:04:46 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  5. tensorflow/c/eager/gradients.cc

      AbstractOperationPtr op(ctx->CreateOperation());
      TF_RETURN_IF_ERROR(op->Reset("ZerosLike", /*raw_device_name=*/nullptr));
      if (isa<tracing::TracingOperation>(op.get())) {
        TF_RETURN_IF_ERROR(dyn_cast<tracing::TracingOperation>(op.get())->SetOpName(
            absl::StrCat("ZerosLike", ToId(t)).c_str()));
      }
      TF_RETURN_IF_ERROR(op->AddInput(t));
      int num_outputs = 1;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/grappler/grappler.cc

      OwnedTFStatus c_status(TF_NewStatus());
      init_fn(&params, c_status.get());
      TF_RETURN_IF_ERROR(tsl::StatusFromTF_Status(c_status.get()));
      TF_RETURN_IF_ERROR(ValidateTPOptimizerRegistrationParams(params));
      TF_RETURN_IF_ERROR(ValidateTPOptimizer(optimizer));
      TF_RETURN_IF_ERROR(ValidateTPOptimizerConfigs(optimizer_configs));
    
      CGraphOptimizerRegister(
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 15K bytes
    - Viewed (1)
  7. tensorflow/c/eager/dlpack.cc

      std::string device_type = parsed_name.type;
      int device_id = 0;
      if (parsed_name.has_id) {
        device_id = parsed_name.id;
      }
    
      ctx.device_id = device_id;
      if (device_type == "CPU") {
        ctx.device_type = DLDeviceType::kDLCPU;
      } else if (device_type == "GPU") {
    #if TENSORFLOW_USE_ROCM
        ctx.device_type = DLDeviceType::kDLROCM;
    #else
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  8. tensorflow/c/c_test_util.cc

      return op;
    }
    
    bool IsPlaceholder(const tensorflow::NodeDef& node_def) {
      if (node_def.op() != "Placeholder" || node_def.name() != "feed") {
        return false;
      }
      bool found_dtype = false;
      bool found_shape = false;
      for (const auto& attr : node_def.attr()) {
        if (attr.first == "dtype") {
          if (attr.second.type() == tensorflow::DT_INT32) {
            found_dtype = true;
          } else {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  9. tensorflow/c/eager/immediate_execution_tensor_handle.cc

      PartialTensorShape shape;
      std::string shape_string;
      if (Shape(&shape).ok()) {
        shape_string = shape.DebugString();
      } else {
        shape_string = "<error computing shape>";
      }
      std::string value_string;
      if (!SummarizeValue(value_string).ok()) {
        value_string = "<error computing value>";
      }
      if (value_string.length() > 100) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  10. tensorflow/c/env.cc

      ::tensorflow::FileStatistics cc_stats;
      TF_SetStatus(status, TF_OK, "");
      ::tensorflow::Status s =
          ::tensorflow::Env::Default()->Stat(filename, &cc_stats);
      ::tensorflow::Set_TF_Status_from_Status(status, s);
      if (s.ok()) {
        stats->length = cc_stats.length;
        stats->mtime_nsec = cc_stats.mtime_nsec;
        stats->is_directory = cc_stats.is_directory;
      }
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 7K bytes
    - Viewed (0)
Back to top