Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 933 for reserve (0.18 sec)

  1. tensorflow/c/eager/parallel_device/parallel_device.cc

        return result;
      }
      std::vector<ParallelTensor*> parallel_inputs;
      std::vector<std::unique_ptr<ParallelTensor>> implicitly_broadcast_tensors;
      parallel_inputs.reserve(inputs.size());
      implicitly_broadcast_tensors.reserve(inputs.size());  // not tight
      for (const auto& input : inputs) {
        if (absl::holds_alternative<TFE_TensorHandle*>(input)) {
          if (operation_name == std::string("_EagerConst")) {
    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)
  2. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

      std::vector<std::unique_ptr<ParallelTensor>> per_device_outputs;
      per_device_outputs.reserve(first_op_output_count);
      for (int i = 0; i < first_op_output_count; ++i) {
        std::vector<TensorHandlePtr> components;
        components.reserve(underlying_devices_.size());
        for (int j = 0; j < underlying_devices_.size(); ++j) {
    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)
  3. tensorflow/c/c_api_function.cc

      if (output_names) {
        output_names_vec.reserve(noutputs);
        for (int i = 0; i < noutputs; ++i) {
          output_names_vec.push_back(string(output_names[i]));
        }
      }
    
      // Process control output names.
      std::vector<string> control_output_names_vec;
      if (control_output_names) {
        control_output_names_vec.reserve(ncontrol_outputs);
        for (int i = 0; i < ncontrol_outputs; ++i) {
    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)
  4. tensorflow/c/eager/abstract_operation.h

    }
    
    inline Status AbstractOperation::SetAttrStringList(
        const char* attr_name, absl::Span<string const> values) {
      std::vector<const char*> raw_strs;
      std::vector<size_t> lengths;
      raw_strs.reserve(values.size());
      lengths.reserve(values.size());
      for (const auto& s : values) {
        raw_strs.emplace_back(s.data());
        lengths.emplace_back(s.size());
      }
      return SetAttrStringList(attr_name,
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Jul 14 16:20:41 GMT 2021
    - 6.8K bytes
    - Viewed (0)
  5. tensorflow/c/eager/tape.h

      std::vector<int64_t> targets;
      std::vector<Gradient*> used_in_grads;
      // We may end up with slightly fewer elements than we reserve, but grad.size()
      // should be a reasonably tight upper bound.
      targets.reserve(grad.size());
      used_in_grads.reserve(grad.size());
      std::unordered_map<int64_t, TapeTensor> sources_that_are_targets;
      for (int grad_index = 0, end = grad.size(); grad_index < end; ++grad_index) {
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
  6. tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc

      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      const std::vector<std::unique_ptr<ParallelTensor>>& handles = *outputs;
      std::vector<ParallelTensor*> handle_inputs;
      handle_inputs.reserve(handles.size());
      for (auto& handle : handles) {
        handle_inputs.push_back(handle.get());
      }
      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> read_op(
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 15.3K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_debug.cc

                                             tensorflow::Status* status) {
      std::vector<int64_t> shape;
      int rank = -1;
      *status = handle.NumDims(&rank);
      if (!status->ok()) {
        return shape;
      }
      shape.reserve(rank);
      for (int i = 0; i < rank; ++i) {
        int64_t dim;
        *status = handle.Dim(i, &dim);
        if (!status->ok()) {
          return shape;
        }
        shape.push_back(dim);
      }
      return shape;
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  8. tensorflow/c/eager/unified_api_testutil.cc

        absl::flat_hash_set<int> null_indices;
        {
          AbstractContextPtr func_ctx(BuildFunction(fn_name));
          std::vector<AbstractTensorHandle*> func_inputs;
          func_inputs.reserve(inputs.size());
          TF_RETURN_IF_ERROR(
              CreateParamsForInputs(func_ctx.get(), inputs, &func_inputs));
          std::vector<AbstractTensorHandle*> model_outputs;
          model_outputs.resize(outputs.size());
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api_unified_experimental_graph.cc

            op_->colocation_constraints.emplace(static_cast<const char*>(values[i]),
                                                lengths[i]);
          }
        } else {
          std::vector<tensorflow::StringPiece> v;
          v.reserve(num_values);
          for (int i = 0; i < num_values; ++i) {
            v.emplace_back(static_cast<const char*>(values[i]), lengths[i]);
          }
          op_->node_builder.Attr(attr_name, v);
        }
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
  10. tensorflow/c/eager/parallel_device/parallel_device_lib.h

      std::vector<TensorHandlePtr> release_tensors() { return std::move(tensors_); }
    
      std::vector<TFE_TensorHandle*> tensors() const {
        std::vector<TFE_TensorHandle*> result;
        result.reserve(tensors_.size());
        for (const TensorHandlePtr& tensor : tensors_) {
          result.emplace_back(tensor.get());
        }
        return result;
      }
    
     private:
      ParallelTensor(const ParallelDevice& device,
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 25 15:21:13 GMT 2023
    - 12.9K bytes
    - Viewed (0)
Back to top