def test_makePredictions(self): cn.trainNetwork(5, self.testfile, self.trainfile) cn.makePredictions(self.testfile) rows, cols = load_extension.getDims(self.testfile) predimage = 'prediction.tif' testrows, testcols = load_extension.getDims(predimage) self.assertEqual((rows, cols), (testrows, testcols)) self.assertIs(type(testrows), int) self.assertIs(type(testcols), int)
def test_trainNetwork(self): cn.trainNetwork(1, self.testfile, self.trainfile) with open('net.pickle', 'rb') as f: net_pretrain = pickle.load(f) self.assertIsNotNone(net_pretrain)