Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for GetUniqueNameForOp (0.22 sec)

  1. tensorflow/cc/framework/scope_test.cc

      EXPECT_EQ(root.GetUniqueNameForOp("foo_1"), "foo_1_1");
      EXPECT_EQ(root.GetUniqueNameForOp("foo_2"), "foo_2");
      EXPECT_EQ(root.GetUniqueNameForOp("foo"), "foo_3");
      EXPECT_EQ(root.GetUniqueNameForOp("foo_2"), "foo_2_1");
    }
    
    TEST(ScopeTest, HierarchicalNames) {
      Scope root = Scope::NewRootScope();
      Scope child = root.NewSubScope("child");
      EXPECT_EQ(child.GetUniqueNameForOp("add"), "child/add");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 08:17:37 UTC 2019
    - 5.5K bytes
    - Viewed (0)
  2. tensorflow/cc/ops/const_op.h

      // can be directly called here instead of adding the Cast op to the graph.
      auto orig_const = AsNodeOut(scope, orig_const_output);
      const auto cast_op_name = scope.GetUniqueNameForOp("Cast");
    
      auto cast_builder = NodeBuilder(cast_op_name, "Cast")
                              .Input(orig_const)
                              .Attr("DstT", DataTypeToEnum<DstT>::v());
      scope.UpdateBuilder(&cast_builder);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 17 09:17:01 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  3. tensorflow/cc/framework/scope_internal.h

      std::shared_ptr<NameMap> name_map_ = nullptr;
      std::shared_ptr<ShapeRefiner> refiner_ = nullptr;
    
      // If scope_used_ is not nullptr, op_name_ should be empty and
      // GetUniqueNameForOp can only be called once on this scope. More calls to
      // GetUniqueNameForOp will cause an error status to be set on this scope.
      std::shared_ptr<bool> scope_used_ = nullptr;
    
      const std::vector<Operation> control_deps_;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 15:46:43 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  4. tensorflow/cc/ops/const_op.cc

    template <typename T>
    Output ConstHelper(const Scope& scope, const T& value, DataType dtype) {
      if (!scope.ok()) return Output();
    
      Node* ret;
      Graph* graph = scope.graph();
      const string unique_name = scope.GetUniqueNameForOp("Const");
      auto builder = NodeBuilder(unique_name, "Const")
                         .Attr("value", value)
                         .Attr("dtype", dtype);
      scope.UpdateBuilder(&builder);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 03 20:58:54 UTC 2017
    - 2.7K bytes
    - Viewed (0)
  5. tensorflow/cc/framework/scope.cc

      const string sep =
          name_.empty() || unique_name.empty() ? "" : kScopeSeparator;
      return strings::StrCat(name_, sep, unique_name);
    }
    
    string Scope::GetUniqueNameForOp(const string& default_name) const {
      if (impl()->single_use_scope()) {
        if (impl()->op_name_.empty() || *impl()->scope_used_) {
          *impl()->status_ =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 05:57:22 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  6. tensorflow/cc/ops/while_loop.cc

                                      next_output_index, dtype);
    
      std::vector<NodeBuilder::NodeOut> input_list({enter_input, next_input});
      const string unique_name = scope.GetUniqueNameForOp("Merge");
      NodeBuilder builder = NodeBuilder(unique_name, "Merge").Input(input_list);
      scope.UpdateBuilder(&builder);
    
      Node* merge_node;
      TF_RETURN_IF_ERROR(builder.Finalize(scope.graph(), &merge_node));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 01:01:21 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. tensorflow/cc/framework/scope.h

      // The following functions are for scope object consumers.
    
      /// Return a unique name, using default_name if an op name has not been
      /// specified.
      string GetUniqueNameForOp(const string& default_name) const;
    
      /// Update the status on this scope.
      /// Note: The status object is shared between all children of this scope.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 09:08:33 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  8. tensorflow/cc/framework/cc_op_gen.cc

      }
    
      strings::StrAppend(&body, "  ::tensorflow::Node* ret;\n");
      strings::StrAppend(&body, "  const auto unique_name = ", scope_str,
                         ".GetUniqueNameForOp(\"", op_info.op_name, "\");\n");
      strings::StrAppend(
          &body, "  auto builder = ::tensorflow::NodeBuilder(unique_name, \"",
          op_info.graph_op_def.name(), "\")\n");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 27 17:22:47 UTC 2023
    - 17K bytes
    - Viewed (0)
  9. tensorflow/cc/gradients/array_grad.cc

      for (int i = start_value_index; i < end_value_index; ++i) {
        inputs.push_back(op.input(i));
      }
    
      auto shapes = ShapeN(scope, inputs);
      const auto unique_name = scope.GetUniqueNameForOp("ConcatOffset");
      auto builder =
          ::tensorflow::NodeBuilder(unique_name, "ConcatOffset")
              .Input(::tensorflow::ops::AsNodeOut(scope, op.input(dim_index)))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 10 23:33:32 UTC 2023
    - 31.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/deadness_analysis_test.cc

      auto _data = ops::AsNodeOut(scope, data);
      if (!scope.ok()) return;
      auto _output_index = ops::AsNodeOut(scope, output_index);
      if (!scope.ok()) return;
      Node* ret;
      const auto unique_name = scope.GetUniqueNameForOp("_SwitchN");
      auto builder = NodeBuilder(unique_name, "_SwitchN")
                         .Input(_data)
                         .Input(_output_index)
                         .Attr("num_outs", num_outs);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 06:59:07 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top