def test_load_reshape_detection(self): if self.data_dir is None: unittest.TestCase.skipTest(self, "DLPY_DATA_DIR is not set in the environment variables") yolo_model = Model(self.s) yolo_model.load(self.data_dir + 'YOLOV2_MULTISIZE.sashdat') model_df = self.s.fetch(table = dict(name = yolo_model.model_name, where = '_DLKey0_ eq "detection1" or _DLKey0_ eq "reshape1"'), to = 50).Fetch anchors_5 = model_df['_DLNumVal_'][model_df['_DLKey1_'] == 'detectionopts.anchors.8'].tolist()[0] self.assertAlmostEqual(anchors_5, 1.0907, 4) depth = model_df['_DLNumVal_'][model_df['_DLKey1_'] == 'reshapeopts.depth'].tolist()[0] self.assertEqual(depth, 256)
def test_load_padding(self): if self.data_dir is None: unittest.TestCase.skipTest(self, "DLPY_DATA_DIR is not set in the environment variables") model5 = Model(self.s) model5.load(path = self.data_dir + 'vgg16.sashdat')
def test_load_weights_attr(self): model = Model(self.s) model.load(path=self.data_dir+'Simple_CNN1.sashdat') # load_weights_attr table from server; expect to be clean model.load_weights_attr(self.data_dir+'Simple_CNN1_weights_attr.sashdat')