Skip to content

Commit 36481fd

Browse files
committed
Fix issue with googlenet module by using relative imports on Python 3.
This commit fixes an issue with importing `sklearn_theano.feature_extraction` due to relative paths not being used within that module. The commit fixes the example on the sklean-theano homepage of recognising cats and dogs in photo [1], clearly a primary use-case of any such machine learning library. Errors fixed (listed for searchability): - No module named 'caffemodel' - No module named 'googlenet_class_labels' - No module named 'googlenet_layer_names' [1] http://sklearn-theano.github.io/auto_examples/plot_multiple_localization.html
1 parent 0fbe39c commit 36481fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn_theano/feature_extraction/caffe/googlenet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
from sklearn.externals import joblib
77
from ...datasets import get_dataset_dir, download
8-
from caffemodel import _parse_caffe_model, parse_caffe_model
8+
from .caffemodel import _parse_caffe_model, parse_caffe_model
99
import os
1010
from ...utils import check_tensor, get_minibatch_indices
11-
from googlenet_class_labels import get_googlenet_class_label
12-
from googlenet_layer_names import get_googlenet_layer_names
11+
from .googlenet_class_labels import get_googlenet_class_label
12+
from .googlenet_layer_names import get_googlenet_layer_names
1313
from sklearn.base import BaseEstimator, TransformerMixin
1414
import theano
1515
import numpy as np

0 commit comments

Comments
 (0)