Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for if (0.17 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/filesystem/plugins/posix/posix_filesystem_helper.cc

                             off_t size) {
      int src_fd = open(src, O_RDONLY);
      if (src_fd < 0) return -1;
    
      // When creating file, use the same permissions as original
      mode_t open_mode = mode & (S_IRWXU | S_IRWXG | S_IRWXO);
    
      // O_WRONLY | O_CREAT | O_TRUNC:
      //   Open file for write and if file does not exist, create the file.
      //   If file exists, truncate its size to 0.
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jan 16 05:36:52 GMT 2020
    - 2.1K bytes
    - Viewed (1)
  3. 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)
  4. 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)
  5. 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)
  6. tensorflow/c/experimental/filesystem/modular_filesystem_test.cc

      Status status = env_->NewWritableFile(filepath, &new_file);
      if (!status.ok())
        GTEST_SKIP() << "NewWritableFile() not supported: " << status;
    
      const std::string test_data("asdf");
      status = new_file->Append(test_data);
      if (!status.ok()) GTEST_SKIP() << "Append() not supported: " << status;
      status = new_file->Flush();
      if (!status.ok()) GTEST_SKIP() << "Flush() not supported: " << status;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:25:58 GMT 2022
    - 71K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

        // Perform this action in a cleanup callback to avoid locking mu_ after
        // locking block->mu.
        if (downloaded_block) {
          absl::MutexLock l(&mu_);
          // Do not update state if the block is already to be evicted.
          if (block->timestamp != 0) {
            // Use capacity() instead of size() to account for all  memory
            // used by the cache.
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/modular_filesystem.cc

                                          TransactionToken* token,
                                          uint64* file_size) {
      if (ops_->get_file_size == nullptr) {
        FileStatistics stat;
        Status status = Stat(fname, &stat);
        if (!status.ok()) return status;
        if (stat.is_directory)
          return errors::FailedPrecondition("Called GetFileSize on a directory");
    
        *file_size = stat.length;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 23.1K bytes
    - Viewed (0)
  9. tensorflow/c/checkpoint_reader.cc

        tensorflow::TensorShape shape;
        status = v2_reader_->LookupDtypeAndShape(name, &dtype, &shape);
        if (status.ok()) {
          out_tensor->reset(new Tensor(dtype, shape));
          status = v2_reader_->Lookup(name, out_tensor->get());
          if (!status.ok()) out_tensor->reset();
        }
      }
      if (!status.ok()) {
        tsl::Set_TF_Status_from_Status(out_status, status);
      }
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Aug 25 21:29:12 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/gradients/tape/tape_operation.cc

      return parent_op_->SetDeviceName(name);
    }
    Status TapeOperation::AddInput(AbstractTensorHandle* input) {
      TF_RETURN_IF_ERROR(parent_op_->AddInput(input));
      forward_op_.inputs.push_back(input);
      return OkStatus();
    }
    Status TapeOperation::AddInputList(
        absl::Span<AbstractTensorHandle* const> inputs) {
      TF_RETURN_IF_ERROR(parent_op_->AddInputList(inputs));
      for (auto input : inputs) {
        forward_op_.inputs.push_back(input);
      }
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
Back to top