예제 #1
0
    def initProject(projectname, setting):
        rtn = {'success': False}

        proj_path = PathProxy.getProjectDir(projectname)
        if os.path.exists(proj_path):
            rtn['error'] = "can not init project because it has exists"
            return rtn

        PathProxy.mkdir(proj_path)
        PathProxy.mkdir(os.path.join(proj_path, "train"))
        PathProxy.mkdir(os.path.join(proj_path, "model"))
        PathProxy.mkdir(os.path.join(proj_path, "test"))
        # cnn type here

        psetting = CNNDivSetting(projectname)
        psetting.createConfig()

        rtn['success'] = True
        return rtn
예제 #2
0
 def isExists(projectname):
     proj_path = PathProxy.getProjectDir(projectname)
     return os.path.exists(proj_path)