File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed 
python/paddle/v2/framework Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ OperatorBase::OperatorBase(const std::string& type,
125125
126126 if  (op_info_it != OpRegistry::op_info_map ().end ()) {
127127 auto * op_proto = op_info_it->second .proto_ ;
128+  if  (op_proto == nullptr ) return ;
128129 for  (auto & output : op_proto->outputs ()) {
129130 if  (output.duplicable ()) { //  If outputs is duplicable, do not set
130131 //  default output
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ def get_all_op_protos():
99 Get all registered op proto from Paddle C++ 
1010 :return: list of OpProto 
1111 """ 
12+  global  g_all_op_protos 
1213 protostrs  =  core .get_all_op_protos ()
1314 if  g_all_op_protos  is  None :
14-  global  g_all_op_protos 
1515 g_all_op_protos  =  dict ()
1616 for  pbstr  in  protostrs :
1717 op_proto  =  framework_pb2 .OpProto .FromString (str (pbstr ))
                         You can’t perform that action at this time. 
           
                  
0 commit comments