Machine-Learning-For-Research / MachineCoding

深度学习实现AI写代码

Repository from Github https://github.comMachine-Learning-For-Research/MachineCodingRepository from Github https://github.comMachine-Learning-For-Research/MachineCoding

深度学习实现AI写代码

利用RNN网络来自动生成python代码

模型训练

  • 修改config.py文件

    # train path
    TRAIN_PATH = [
        # '/Users/zijiao/tensorflow',
        # 此处添加待训练的代码路径
    ]
  • 运行train.py开始训练,输出如下

模型使用

训练完模型之后,直接运行coding.py即可开始自动生成代码,如下

Load last model params successfully.
Start predict...
    def test_URLTddresviound(shouldConffts(saventer):
        cada = Resition('Helidenent')
        self.assertEqual(n_moded.add(self.username, reactor)
            return None
        c.name = self.mktype("somethod')
            bNd[0], B_MESSD = IBool(1,4)
        self.container.remactorAuttom_optswith(14, makeR), (True)
        cmptraties in type()
        cleed = port
        return ClientLogChecker().statil_netxrForm(self.assertFalseCicneLogoint, self, *args)

About

深度学习实现AI写代码


Languages

Language:Python 100.0%