Exemple #1
0
        public static String SaveDataSet()
        {
            String content = JsonConvert.SerializeObject(NeuralNetworkHandler.keeper);

            String fileId = GoogleDriveHandler.GetFileIdByName(NeuralNetworkHandler.keeper.Name);

            if (fileId == null)
            {
                GoogleDriveHandler.UploadGoogleDocument(content, NeuralNetworkHandler.keeper.Name + "-ds", "application/vnd.google-apps.file", "text/plain");
            }
            else
            {
                GoogleDriveHandler.UploadGoogleDocument(content, NeuralNetworkHandler.keeper.Name + "-ds", "application/vnd.google-apps.file", "text/plain", fileId);
            }

            return(String.Format("Successfully saved the dataset to {0}-ds", NeuralNetworkHandler.keeper.Name));
        }
Exemple #2
0
        public static String SaveNetwork(String name)
        {
            String content = ModelFileHandler.SaveModelToString(network);

            String fileId = GoogleDriveHandler.GetFileIdByName(name + "-nn");

            if (fileId == null)
            {
                GoogleDriveHandler.UploadGoogleDocument(content, name + "-nn", "application/vnd.google-apps.file", "text/plain");
            }
            else
            {
                GoogleDriveHandler.UploadGoogleDocument(content, name + "-nn", "application/vnd.google-apps.file", "text/plain", fileId);
            }

            return(String.Format("Successfully saved the network to {0}-nn", network.Name));
        }