Skip to content

Commit

Permalink
Update classifier.py
Browse files Browse the repository at this point in the history
  • Loading branch information
asafgal committed Apr 2, 2020
1 parent 14cef5a commit bd6d01a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion antrax/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def save(self, modelfile):
# save classifier params
with h5py.File(modelfile, 'a') as f:
f.create_dataset('prmtrs', data=json.dumps(self.prmtrs))
f.create_dataset('classes', (len(self.classes), 1), 'S10', [np.string_(x) for x in self.classes])
if self.classes is not None:
f.create_dataset('classes', (len(self.classes), 1), 'S10', [np.string_(x) for x in self.classes])

def prepare_images(self):

Expand Down

0 comments on commit bd6d01a

Please sign in to comment.