Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for GetGradDefs (0.24 sec)

  1. tensorflow/c/c_test_util.h

                      tensorflow::AttrValue* attr_value, TF_Status* s);
    
    // Returns a sorted vector of std::pair<function_name, gradient_func> from
    // graph_def.library().gradient()
    std::vector<std::pair<string, string>> GetGradDefs(
        const tensorflow::GraphDef& graph_def);
    
    // Returns a sorted vector of names contained in `grad_def`
    std::vector<string> GetFuncNames(const tensorflow::GraphDef& graph_def);
    
    class CSession {
     public:
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 09 01:06:53 GMT 2018
    - 6K bytes
    - Viewed (0)
  2. tensorflow/c/c_api_function_test.cc

      ASSERT_EQ(0, GetGradDefs(gdef).size());
    
      // Make grad_func a gradient of func
      TF_GraphCopyFunction(host_graph_, func, grad_func, s_);
      ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
    
      // Verify that function and its grad are linked
      gdef.Clear();
      GetGraphDef(host_graph_, &gdef);
      std::vector<std::pair<string, string>> grads = GetGradDefs(gdef);
      ASSERT_EQ(1, grads.size());
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 20 22:08:54 GMT 2023
    - 63.6K bytes
    - Viewed (6)
  3. tensorflow/c/c_test_util.cc

      bool ret = TF_GetCode(s) == TF_OK;
      if (ret) ret = attr_value->ParseFromArray(buffer->data, buffer->length);
      TF_DeleteBuffer(buffer);
      return ret;
    }
    
    std::vector<std::pair<string, string>> GetGradDefs(
        const tensorflow::GraphDef& graph_def) {
      std::vector<std::pair<string, string>> grads;
      for (const tensorflow::GradientDef& grad : graph_def.library().gradient()) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
Back to top