Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 61 for if (0.15 sec)

  1. tensorflow/c/experimental/gradients/array_grad.cc

        for (int i = 0; i < grad_outputs.size(); i++) {
          auto grad_input = grad_outputs[i];
          // TODO(srbs): Should we add a copy contructor to AbstractTensorHandle
          // that takes care of this similar to `Tensor`?
          if (grad_input) {
            grad_input->Ref();
          }
          grad_inputs[i] = grad_input;
        }
        return absl::OkStatus();
      }
      ~IdentityNGradientFunction() override {}
    };
    }  // namespace
    
    C++
    - Registered: Tue Apr 09 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_static.cc

    // Return value will be unused
    bool StaticallyRegisterLocalFilesystems() {
      TF_FilesystemPluginInfo info;
      TF_InitPlugin(&info);
      Status status = filesystem_registration::RegisterFilesystemPluginImpl(&info);
      if (!status.ok()) {
        VLOG(0) << "Static POSIX filesystem could not be registered: " << status;
        return false;
      }
      return true;
    }
    
    // Perform the actual registration
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/gradients/array_grad_test.cc

                          absl::Span<AbstractTensorHandle* const> inputs,
                          absl::Span<AbstractTensorHandle*> outputs) {
      std::vector<AbstractTensorHandle*> temp_outputs(2);
      TF_RETURN_IF_ERROR(
          ops::IdentityN(ctx, inputs, absl::MakeSpan(temp_outputs), "IdentityN"));
      // Although, `ops::IdentityN` returns 2 tensors, the first tensor isn't needed
      // for computing gradient so we could safely drop it.
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  10. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

      if (TF_GetCode(status) != TF_OK) return;
    
      // unwrap op_ and set step_id only if valid step id value was set.
      // Currently only required for non-TFRT use cases, e.g., EagerOp.
      if (step_id_.has_value()) {
        tensorflow::unwrap(op_.get())->SetStepId(step_id_.value());
      }
    
      TFE_Execute(op_.get(), unwrapped_results.data(), &real_num_outputs, status);
      if (TF_GetCode(status) != TF_OK) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
Back to top