Skip to content

Commit

Permalink
Moved synset import
Browse files Browse the repository at this point in the history
  • Loading branch information
gabgoh committed Aug 6, 2019
1 parent 5cd8051 commit 423ffd7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lucid/modelzoo/vision_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
from lucid.misc.io import load, save
import lucid.misc.io.showing as showing

# ImageNet classes correspond to WordNet Synsets.
from lucid.modelzoo.wordnet import synset_from_id


IMAGENET_MEAN = np.array([123.68, 116.779, 103.939])
IMAGENET_MEAN_BGR = np.flip(IMAGENET_MEAN, 0)
Expand Down Expand Up @@ -145,6 +142,8 @@ def synset_ids(self):

@property
def synsets(self):
from lucid.modelzoo.wordnet import synset_from_id

if not self._synsets:
self._synsets = [synset_from_id(s_id) for s_id in self.synset_ids]
return self._synsets
Expand Down

0 comments on commit 423ffd7

Please sign in to comment.