Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for It (0.2 sec)

  1. tensorflow/c/c_api.cc

      auto attrs = oper->node.attrs();
      int count = 0;
      AttrValueMap::const_iterator it;
      for (it = attrs.begin(); it != attrs.end(); it++) {
        if (count == i) {
          strncpy(output, it->first.c_str(), it->first.length());
          status->status = absl::OkStatus();
          return;
        }
        count++;
      }
      status->status = OutOfRange("Operation only has ", count,
    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

      if (dst_fd < 0) {
        close(src_fd);
        return -1;
      }
    
      // Both files have been opened, do the transfer.
      // Since errno would be overridden by `close` below, save it here.
      int error_code = 0;
      if (CopyFileContents(dst_fd, src_fd, size) < 0) error_code = errno;
    
      close(src_fd);
      close(dst_fd);
      if (error_code != 0) {
        errno = error_code;
        return -1;
      } else {
    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/eager/c_api_unified_experimental.cc

    void TF_SetTracingImplementation(const char* name, TF_Status* s) {
      tsl::Set_TF_Status_from_Status(s, SetDefaultTracingEngine(name));
    }
    
    // Creates a new TensorFlow function, it is an execution context attached to a
    // given tracing context.
    TF_ExecutionContext* TF_CreateFunction(const char* fn_name, TF_Status* s) {
      return wrap(CreateTracingExecutionContext(fn_name, s));
    }
    
    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/experimental/gradients/array_grad_test.cc

      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.
      outputs[0] = temp_outputs[1];
      temp_outputs[0]->Unref();
      return absl::OkStatus();
    }
    
    class CppGradients
        : public ::testing::TestWithParam<std::tuple<const char*, bool, bool>> {
     protected:
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  5. tensorflow/c/eager/dlpack.cc

    #include "tensorflow/core/platform/logging.h"
    
    namespace tensorflow {
    
    namespace {
    
    // Managing context for the DLManagedTensor, will manage the lifetime of
    // DLManagedTensor. When calling DLManagedTensor::deleter, it will notify the
    // original framework of destruction, and this context will be deleted also.
    struct TfDlManagedTensorCtx {
      TensorReference reference;
      std::vector<int64_t> shape;
      std::vector<int64_t> strides;
    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)
  6. tensorflow/c/eager/gradients.cc

      AbstractContext* ctx_;
    };
    
    // Returns the number of elements in the gradient tensor.
    int64_t TapeVSpace::NumElements(AbstractTensorHandle* tensor) const {
      // TODO(srbs): It seems like this is used only for performance optimization
      // and not for correctness. The only downside of keeping this 1 seems to be
      // that the gradient accumulation is unbounded and we will never
    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)
  7. tensorflow/c/eager/parallel_device/parallel_device.cc

        absl::variant<ParallelTensor*, TFE_TensorHandle*>;
    
    // A ParallelDevice on its own is not registered with a TFE_Context, and so has
    // no device name (e.g. for `tf.device`). `NamedParallelDevice` associates a
    // name with it, which lets us pack its `ParallelTensor`s into TFE_TensorHandles
    // placed on the parallel device.
    class NamedParallelDevice {
     public:
      NamedParallelDevice(const std::string& name,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Mar 29 22:05:31 GMT 2023
    - 18.3K bytes
    - Viewed (0)
  8. tensorflow/c/c_api_function.cc

      const auto& it = func->record->fdef().attr().find(attr_name);
      if (it == func->record->fdef().attr().end()) {
        status->status =
            InvalidArgument("Function '", func->record->fdef().signature().name(),
                            "' has no attr named '", attr_name, "'.");
        return;
      }
      status->status = MessageToBuffer(it->second, output_attr_value);
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 13.6K bytes
    - Viewed (2)
  9. tensorflow/c/eager/c_api_distributed_test.cc

      }
    
     private:
      bool first_call_ = true;
    };
    
    // After the graph pass is registered, it takes effect globally and can affect
    // other test cases. Define a static variable to switch it on and off.
    bool GraphErrorInjectionPass::enabled_ = false;
    
    // Test to ensure that a registered graph optimization pass is only executed
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  10. tensorflow/c/eager/gradients_test.cc

          "or NotDifferentiableGradientFunction.",
          s.message());
      ASSERT_EQ(nullptr, outputs[0]);
    }
    
    // TODO(b/164171226): Enable this test with tfrt after AddInputList is
    // supported. It is needed for IdentityN.
    #ifdef PLATFORM_GOOGLE
    INSTANTIATE_TEST_SUITE_P(
        UnifiedCAPI, CppGradients,
        ::testing::Combine(::testing::Values("graphdef", "mlir"),
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7K bytes
    - Viewed (0)
Back to top