Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 53 for if (0.12 sec)

  1. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

      *object = fname.substr(bucket_end + 1);
    
      if (object->empty() && !object_empty_ok) {
        TF_SetStatus(status, TF_INVALID_ARGUMENT,
                     "GCS path doesn't contain an object name.");
      }
    }
    
    /// Appends a trailing slash if the name doesn't already have one.
    static void MaybeAppendSlash(std::string* name) {
      if (name->empty())
        *name = "/";
      else if (name->back() != '/')
        name->push_back('/');
    }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 23 06:55:53 GMT 2023
    - 46.9K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/gradients/math_grad.cc

        // Get transpose attrs
        bool t_a;
        TF_RETURN_IF_ERROR(forward_attrs_.Get("transpose_a", &t_a));
    
        bool t_b;
        TF_RETURN_IF_ERROR(forward_attrs_.Get("transpose_b", &t_b));
    
        // Conj each input
        AbstractTensorHandle* conj_output;
        std::string name = "Conj_A_MatMul_Grad";
        TF_RETURN_IF_ERROR(
            SafeConj(ctx, forward_inputs_[0], &conj_output, name.c_str()));
    
    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)
  3. tensorflow/c/eager/c_api.cc

      if (!status->status.ok()) return nullptr;
    
      return tensorflow::wrap(tensorflow::TensorHandle::CreateLocalHandle(tensor));
    }
    
    void TFE_DeleteTensorHandle(TFE_TensorHandle* h) {
      if (h == nullptr) return;
    
      tensorflow::profiler::TraceMe activity(
          "TFE_DeleteTensorHandle", tensorflow::profiler::TraceMeLevel::kInfo);
      if (h) {
        tensorflow::unwrap(h)->Unref();
      }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  4. tensorflow/c/eager/unified_api_testutil.cc

          for (auto output : output_list.outputs) {
            output->Unref();
          }
          TF_RETURN_IF_ERROR(ctx->RegisterFunction(func));
        }
    
        AbstractOperationPtr fn_op(ctx->CreateOperation());
        TF_RETURN_IF_ERROR(fn_op->Reset(fn_name, /*raw_device_name=*/nullptr));
        for (auto input : inputs) {
          TF_RETURN_IF_ERROR(fn_op->AddInput(input));
        }
        int retvals = outputs.size() - null_indices.size();
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_unified_experimental_graph.cc

        TracingOperationPtr operation(CreateOperation());
        TF_RETURN_IF_ERROR(operation->Reset("Placeholder", nullptr));
        TF_RETURN_IF_ERROR(
            operation->SetOpName(absl::StrCat("_input_", inputs_.size()).c_str()));
        TF_RETURN_IF_ERROR(operation->SetAttrType("dtype", dtype));
        if (!shape.unknown_rank()) {
          TF_RETURN_IF_ERROR(operation->SetAttrShape(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
  6. tensorflow/c/eager/unified_api_test.cc

      PartialTensorShape shape;
      TF_RETURN_IF_ERROR(inputs[0]->Shape(&shape));
      if (shape.dims() != 0) {
        return errors::InvalidArgument(
            "Tensor expected to have scalar shape found rank: ", shape.dims());
      }
      return absl::OkStatus();
    }
    
    TEST_P(UnifiedAPI, TestTensorShapeScalar) {
      if (UseFunction() && UseMlir()) {
        // TODO(b/173074167): Remove this.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_experimental.cc

        dimvec[i] = static_cast<int64_t>(dims[i]);
      }
    
      if (ctx == nullptr) {
        status->status = tensorflow::errors::InvalidArgument("Invalid Context");
        return nullptr;
      }
    
      tensorflow::AbstractTensorInterface* t =
          tensorflow::unwrap(ctx)->CreateTensor(
              static_cast<tensorflow::DataType>(dtype), dimvec);
    
      if (t == nullptr) {
        status->status =
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 11 23:52:39 GMT 2024
    - 35.9K bytes
    - Viewed (3)
  8. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util.cc

      tensorflow::AsyncValueTensor* av_tensor =
          tensorflow::AsyncValueTensor::FromTensor(tensor);
      if (av_tensor == nullptr || av_tensor->GetBuffer() == nullptr) {
        return absl::InternalError("Input tensor does not have PjRtBuffer.");
      }
      auto* c_api_buffer =
          dynamic_cast<xla::PjRtCApiBuffer*>(av_tensor->GetBuffer().get());
      if (c_api_buffer == nullptr) {
        return absl::InternalError(
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Mon Oct 30 19:20:20 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  9. tensorflow/c/eager/tracing_utils.cc

    namespace tensorflow {
    namespace tracing {
    
    Status MaybeSetOpName(AbstractOperation* op, const char* op_name) {
      if (isa<TracingOperation>(op)) {
        TF_RETURN_IF_ERROR(dyn_cast<TracingOperation>(op)->SetOpName(op_name));
      }
      if (isa<gradients::TapeOperation>(op)) {
        TF_RETURN_IF_ERROR(MaybeSetOpName(
            dyn_cast<gradients::TapeOperation>(op)->GetBackingOperation(),
            op_name));
      }
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api_test_util.cc

      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()) {
        TFE_OpSetDevice(op, device_name.c_str(), status);
      }
      if (TF_GetCode(status) != TF_OK) return nullptr;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
Back to top