Пример #1
0
 def c_support_code(self):
     fun_prefix = "%s_%i" % (self.fun_name, id(self.recurrent_transform))
     funloader = make_funloader_code(self.recurrent_transform,
                                     fun_prefix + "_fun_fwd")
     crnn_path = os.path.dirname(__file__)
     with open(crnn_path + "/c_support_code_mdlstm.cpp") as f:
         return funloader + f.read()
Пример #2
0
 def c_support_code(self):
   crnn_path = os.path.dirname(__file__)
   fun_prefix = "%s_%i" % (self.fun_name, id(self.recurrent_transform))
   funloader = make_funloader_code(self.recurrent_transform, fun_prefix + "_fun_bwd", fun_prefix + "_fun_reset")
   with open(crnn_path + "/c_support_code_mdlstm.cpp") as f:
     return funloader + f.read()