Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for DoShapeInference (0.69 sec)

  1. tensorflow/cc/ops/const_op.h

      scope.UpdateBuilder(&cast_builder);
      Node* ret;
      scope.UpdateStatus(cast_builder.Finalize(scope.graph(), &ret));
      if (!scope.ok()) return Output();
      scope.UpdateStatus(scope.DoShapeInference(ret));
      return Output(ret, 0);
    }
    
    template <typename T>
    Output Const(const Scope& scope, const T& v, const TensorShape shape) {
      return Const(scope, Input::Initializer(v, shape));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 17 09:17:01 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/build_xla_ops_pass_test.cc

      TF_ASSERT_OK(root.graph()->AddFunctionLibrary(fdef_lib));
    
      Node* call;
      TF_ASSERT_OK(MakeXlaCompiledKernel(root.graph(), "cluster_0", "C", &call));
      TF_ASSERT_OK(root.DoShapeInference(call));
      call->AddAttr(kXlaHasReferenceVarsAttr, false);
    
      Node* write_op = MakeWrite(root, Output(call), "write_result");
      write_op->AddAttr(kXlaHasReferenceVarsAttr, false);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  3. tensorflow/cc/ops/const_op.cc

                         .Attr("dtype", dtype);
      scope.UpdateBuilder(&builder);
      scope.UpdateStatus(builder.Finalize(graph, &ret));
      if (!scope.ok()) return Output();
    
      scope.UpdateStatus(scope.DoShapeInference(ret));
      if (!scope.ok()) return Output();
    
      return Output(ret);
    }
    }  // namespace
    
    Output Const(const Scope& scope, const Input::Initializer& val) {
      if (!val.status.ok()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 03 20:58:54 UTC 2017
    - 2.7K bytes
    - Viewed (0)
  4. tensorflow/cc/framework/scope.h

      // API to prevent custom op wrappers from needing access to shape_refiner.h or
      // scope_internal.h.
      // TODO(skyewm): remove this from public API
      Status DoShapeInference(Node* node) const;
    
      // Creates a new root scope that causes all DoShapeInference() calls to return
      // OkStatus() (on the returned scope and any subscopes). Used for testing.
      // TODO(skyewm): fix tests that still require this and eventually remove, or
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 09:08:33 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  5. tensorflow/cc/framework/scope_internal.h

      const string device_ = "";
      const string assigned_device_ = "";
      const string xla_cluster_ = "";
      const std::unordered_set<string> colocation_constraints_;
    
      // If true, Scope::DoShapeInference() always returns Status:OK().
      // TODO(skyewm): remove this when possible
      const bool disable_shape_inference_;
    };
    
    }  // namespace tensorflow
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 15:46:43 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/cc/ops/while_loop.cc

      scope.UpdateBuilder(&builder);
    
      Node* merge_node;
      TF_RETURN_IF_ERROR(builder.Finalize(scope.graph(), &merge_node));
      TF_RETURN_IF_ERROR(scope.DoShapeInference(merge_node));
      *merge_output = Output(merge_node, 0);
      return absl::OkStatus();
    }
    
    // Creates the condition subgraph defined by `cond`.
    Status CreateCond(const Scope& scope, const CondGraphBuilderFn& cond,
    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/compiler/jit/encapsulate_xla_computations_pass_test.cc

                      .Attr("_variable_start_index", 4)
                      .Finalize(&def));
    
      Status status;
      Node* launch = scope.graph()->AddNode(def, &status);
      TF_CHECK_OK(status);
      TF_CHECK_OK(scope.DoShapeInference(launch));
      scope.graph()->AddEdge(a.node(), 0, launch, 0);
      scope.graph()->AddEdge(b.node(), 0, launch, 1);
      scope.graph()->AddEdge(c.node(), 0, launch, 2);
      scope.graph()->AddEdge(d.node(), 0, launch, 3);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 16 18:03:15 UTC 2023
    - 14.7K bytes
    - Viewed (0)
  8. tensorflow/cc/framework/scope.cc

      } else {
        return {Scope(new Impl(*this, Impl::Tags::ScopeName(), impl()->op_name_,
                               true /* copy_names */)),
                *this};
      }
    }
    
    Status Scope::DoShapeInference(Node* node) const {
      if (impl_->disable_shape_inference_) return absl::OkStatus();
      return impl_->refiner_->AddNode(node);
    }
    
    class InternalScope {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 05:57:22 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  9. tensorflow/cc/framework/cc_op_gen.cc

                         scope_str, ".graph(), &ret));\n");
      strings::StrAppend(&body, "  ", return_on_error, "\n");
      strings::StrAppend(&body, "  ", scope_str, ".UpdateStatus(", scope_str,
                         ".DoShapeInference(ret));\n");
    
      GetOutput(op_info, &body);
      return body;
    }
    
    void WriteClassDef(const OpInfo& op_info, WritableFile* cc) {
      string class_def;
      strings::StrAppend(
          &class_def,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 27 17:22:47 UTC 2023
    - 17K bytes
    - Viewed (0)
  10. tensorflow/cc/gradients/array_grad.cc

      scope.UpdateBuilder(&builder);
      ::tensorflow::Node* concat_offset_node;
      scope.UpdateStatus(builder.Finalize(scope.graph(), &concat_offset_node));
      scope.UpdateStatus(scope.DoShapeInference(concat_offset_node));
      if (concat_offset_node->num_outputs() != inputs.size()) {
        return errors::Internal("ConcatOffset has invalid output count");
      }
      if (grad_inputs.size() != 1) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 10 23:33:32 UTC 2023
    - 31.7K bytes
    - Viewed (0)
Back to top