def test_model10(self):
    model1 = Sequential(self.s, model_table='Simple_CNN1')
    model1.add(InputLayer(3, 224, 224))
    model1.add(Conv2d(8, 7))
    model1.add(Pooling(2))
    model1.add(Conv2d(8, 7))
    model1.add(Pooling(2))
    model1.add(Dense(16))
    model1.add(OutputLayer(act='softmax', n=2))
    if (self.data_dir is None):
        unittest.TestCase.skipTest(self, 'DLPY_DATA_DIR is not set in the environment variables')
    (caslib, path, tmp_caslib) = caslibify(self.s, path=(self.data_dir + 'images.sashdat'), task='load')
    self.s.table.loadtable(caslib=caslib, casout={'name': 'eee', 'replace': True}, path=path)
    r = model1.fit(data='eee', inputs='_image_', target='_label_', save_best_weights=True)
    self.assertTrue((r.severity == 0))
    r2 = model1.evaluate(data='eee')
    self.assertTrue((r2.severity == 0))
    model1.save_to_table(self.data_dir)
    if ((caslib is not None) and tmp_caslib):
        self.s.retrieve('table.dropcaslib', message_level='error', caslib=caslib)
def test_model10(self):
    model1 = Sequential(self.s, model_table='Simple_CNN1')
    model1.add(InputLayer(3, 224, 224))
    model1.add(Conv2d(8, 7))
    model1.add(Pooling(2))
    model1.add(Conv2d(8, 7))
    model1.add(Pooling(2))
    model1.add(Dense(16))
    model1.add(OutputLayer(act='softmax', n=2))
    if (self.data_dir is None):
        unittest.TestCase.skipTest(self, 'DLPY_DATA_DIR is not set in the environment variables')
    (caslib, path, tmp_caslib) = caslibify(self.s, path=(self.data_dir + 'images.sashdat'), task='load')
    self.s.table.loadtable(caslib=caslib, casout={'name': 'eee', 'replace': True}, path=path)
    r = model1.fit(data='eee', inputs='_image_', target='_label_', save_best_weights=True)
    self.assertTrue((r.severity == 0))
    r2 = model1.evaluate(data='eee')
    self.assertTrue((r2.severity == 0))
    model1.save_to_table(self.data_dir)
    if ((caslib is not None) and tmp_caslib):
        self.s.retrieve('table.dropcaslib', message_level='error', caslib=caslib)