Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Error nosetests -v sknn.tests test checks #224

Open
palaiya opened this issue Jan 6, 2017 · 3 comments
Open

Error nosetests -v sknn.tests test checks #224

palaiya opened this issue Jan 6, 2017 · 3 comments

Comments

@palaiya
Copy link

palaiya commented Jan 6, 2017

#I am using the Python(2.7.6) on ubuntu(14.04.2 LTS), numpy(1.11.3) and scikit-learn version(0.18.1). When i run nosetests -v sknn.tests it throws the following exception :

======================================================================
ERROR: test_DownscaleUpscale (sknn.tests.test_conv.TestUpscaling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_conv.py", line 138, in test_DownscaleUpscale
    scale=1)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_conv.py", line 120, in _run
    nn.fit(a_in, a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 162, in _create_layer
    return self._create_convolution_layer(name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 124, in _create_convolution_layer
    network = lasagne.layers.Upscale2DLayer(
AttributeError: 'module' object has no attribute 'Upscale2DLayer'

======================================================================
ERROR: test_UpscalingFactorFour (sknn.tests.test_conv.TestUpscaling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_conv.py", line 130, in test_UpscalingFactorFour
    scale=4)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_conv.py", line 120, in _run
    nn.fit(a_in, a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 162, in _create_layer
    return self._create_convolution_layer(name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 124, in _create_convolution_layer
    network = lasagne.layers.Upscale2DLayer(
AttributeError: 'module' object has no attribute 'Upscale2DLayer'

======================================================================
ERROR: test_BatchNormSerializePredictEquals (sknn.tests.test_deep.TestConvolutionDeterminism)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 94, in test_BatchNormSerializePredictEquals
    self.run_EqualityTest(lambda a: self.make(a, train=True, normalize='batch'), self.serialize, assert_true)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 48, in run_EqualityTest
    nn1 = maker(activation)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 94, in <lambda>
    self.run_EqualityTest(lambda a: self.make(a, train=True, normalize='batch'), self.serialize, assert_true)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 109, in make
    nn.fit(self.a_in, self.a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 162, in _create_layer
    return self._create_convolution_layer(name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 138, in _create_convolution_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'

======================================================================
ERROR: test_BatchNormSerializePredictEquals (sknn.tests.test_deep.TestDeepDeterminism)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 94, in test_BatchNormSerializePredictEquals
    self.run_EqualityTest(lambda a: self.make(a, train=True, normalize='batch'), self.serialize, assert_true)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 48, in run_EqualityTest
    nn1 = maker(activation)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 94, in <lambda>
    self.run_EqualityTest(lambda a: self.make(a, train=True, normalize='batch'), self.serialize, assert_true)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_deep.py", line 60, in make
    nn.fit(self.a_in, self.a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 171, in _create_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'

======================================================================
ERROR: test_AutoInitializeWithOutputUnits (sknn.tests.test_deep.TestDeepNetwork)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_linear.py", line 31, in test_AutoInitializeWithOutputUnits
    self.nn.predict(a_in)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 315, in predict
    return super(Regressor, self)._predict(X)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 260, in _predict
    self._initialize(X)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 171, in _create_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'
-------------------- >> begin captured logging << --------------------
sknn: WARNING: WARNING: Computing estimates with an untrained network.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_FitAutoInitialize (sknn.tests.test_deep.TestDeepNetwork)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_linear.py", line 35, in test_FitAutoInitialize
    self.nn.fit(a_in, a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 171, in _create_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'

======================================================================
ERROR: test_ResizeInputFrom3D (sknn.tests.test_deep.TestDeepNetwork)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_linear.py", line 45, in test_ResizeInputFrom3D
    self.nn.fit(a_in, a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 171, in _create_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'

======================================================================
ERROR: test_ResizeInputFrom4D (sknn.tests.test_deep.TestDeepNetwork)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_linear.py", line 40, in test_ResizeInputFrom4D
    self.nn.fit(a_in, a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 171, in _create_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'

======================================================================
ERROR: test_BatchNormExplicit (sknn.tests.test_rules.TestRegularization)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_rules.py", line 89, in test_BatchNormExplicit
    self._run(nn)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_rules.py", line 27, in _run
    nn.fit(a_in, a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 162, in _create_layer
    return self._create_convolution_layer(name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 138, in _create_convolution_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'

======================================================================
ERROR: test_BatchNormPerLayer (sknn.tests.test_rules.TestRegularization)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_rules.py", line 99, in test_BatchNormPerLayer
    self._run(nn)
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_rules.py", line 27, in _run
    nn.fit(a_in, a_out)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 300, in fit
    return super(Regressor, self)._fit(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 213, in _fit
    X, y = self._initialize(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 42, in _initialize
    return self._backend._initialize_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 241, in _initialize_impl
    self._create_mlp(X, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 188, in _create_mlp
    network = self._create_layer(layer.name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 162, in _create_layer
    return self._create_convolution_layer(name, layer, network)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 138, in _create_convolution_layer
    network = lasagne.layers.batch_norm(network)
AttributeError: 'module' object has no attribute 'batch_norm'

======================================================================
ERROR: test_TrainRandomOneEpoch (sknn.tests.test_types.TestFormatDeterminism)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_types.py", line 160, in test_TrainRandomOneEpoch
    nn2._fit(X_s, y_s)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 239, in _fit
    self._train(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 151, in _train
    avg_train_error = self._backend._train_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 338, in _train_impl
    return self._batch_impl(X, y, w, self.trainer, mode='train', output='.', shuffle=True)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 319, in _batch_impl
    for Xb, yb, wb, _ in self._iterate_data(self.batch_size, X, y, w, shuffle):
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
    Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 293, in cast
    array = array[indices]
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/dok.py", line 140, in __getitem__
    raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices
-------------------- >> begin captured logging << --------------------
sknn: INFO: Initializing neural network with 1 layers, 16 inputs and 16 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  16  
sknn: DEBUG: 
sknn: INFO: Training on dataset of 8 samples with 256 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          1.234e-01                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Initializing neural network with 1 layers, 16 inputs and 16 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  16  
sknn: DEBUG: 
sknn: INFO: Training on dataset of 8 samples with 16 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_FitFloat32 (sknn.tests.test_types.TestScipySparseMatrix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_types.py", line 39, in test_FitFloat32
    self.nn._fit(X, y)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 239, in _fit
    self._train(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 151, in _train
    avg_train_error = self._backend._train_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 338, in _train_impl
    return self._batch_impl(X, y, w, self.trainer, mode='train', output='.', shuffle=True)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 319, in _batch_impl
    for Xb, yb, wb, _ in self._iterate_data(self.batch_size, X, y, w, shuffle):
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
    Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 293, in cast
    array = array[indices]
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/dok.py", line 140, in __getitem__
    raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices
-------------------- >> begin captured logging << --------------------
sknn: INFO: Initializing neural network with 1 layers, 4 inputs and 4 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  4   
sknn: DEBUG: 
sknn: INFO: Training on dataset of 8 samples with 0 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          0.000e+00                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 0 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          0.000e+00                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 0 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_FitFloat64 (sknn.tests.test_types.TestScipySparseMatrix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_types.py", line 32, in test_FitFloat64
    self.nn._fit(X, y)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 239, in _fit
    self._train(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 151, in _train
    avg_train_error = self._backend._train_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 338, in _train_impl
    return self._batch_impl(X, y, w, self.trainer, mode='train', output='.', shuffle=True)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 319, in _batch_impl
    for Xb, yb, wb, _ in self._iterate_data(self.batch_size, X, y, w, shuffle):
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
    Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 293, in cast
    array = array[indices]
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/dok.py", line 140, in __getitem__
    raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices
-------------------- >> begin captured logging << --------------------
sknn: INFO: Initializing neural network with 1 layers, 4 inputs and 4 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  4   
sknn: DEBUG: 
sknn: INFO: Training on dataset of 8 samples with 0 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          0.000e+00                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 0 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          0.000e+00                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 0 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_FitHybrid (sknn.tests.test_types.TestScipySparseMatrix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_types.py", line 46, in test_FitHybrid
    self.nn._fit(X, y)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 239, in _fit
    self._train(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 151, in _train
    avg_train_error = self._backend._train_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 338, in _train_impl
    return self._batch_impl(X, y, w, self.trainer, mode='train', output='.', shuffle=True)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 319, in _batch_impl
    for Xb, yb, wb, _ in self._iterate_data(self.batch_size, X, y, w, shuffle):
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
    Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 293, in cast
    array = array[indices]
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/dok.py", line 140, in __getitem__
    raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices
-------------------- >> begin captured logging << --------------------
sknn: INFO: Initializing neural network with 1 layers, 4 inputs and 4 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  4   
sknn: DEBUG: 
sknn: INFO: Training on dataset of 8 samples with 32 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          0.000e+00                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 32 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          0.000e+00                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 32 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_FitMutator (sknn.tests.test_types.TestScipySparseMatrix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_types.py", line 61, in test_FitMutator
    self.nn._fit(X, y)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 239, in _fit
    self._train(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 151, in _train
    avg_train_error = self._backend._train_impl(X, y, w)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 338, in _train_impl
    return self._batch_impl(X, y, w, self.trainer, mode='train', output='.', shuffle=True)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 319, in _batch_impl
    for Xb, yb, wb, _ in self._iterate_data(self.batch_size, X, y, w, shuffle):
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
    Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 293, in cast
    array = array[indices]
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/dok.py", line 140, in __getitem__
    raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices
-------------------- >> begin captured logging << --------------------
sknn: INFO: Initializing neural network with 1 layers, 4 inputs and 4 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  4   
sknn: DEBUG: 
sknn: INFO: Training on dataset of 8 samples with 32 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          4.323e-01                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 32 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
    1          3.681e-01                 N/A            0.0s
sknn: DEBUG: 
sknn: INFO: Terminating after specified 1 total iterations.
sknn: INFO: Training on dataset of 8 samples with 32 total size.
sknn: DEBUG:   - Terminating loop after 1 total iterations.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_Predict32 (sknn.tests.test_types.TestScipySparseMatrix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_types.py", line 77, in test_Predict32
    yp = self.nn._predict(X)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 262, in _predict
    return self._backend._predict_impl(X)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 273, in _predict_impl
    for Xb, _, _, idx  in self._iterate_data(self.batch_size, X, y, shuffle=False):
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
    Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 293, in cast
    array = array[indices]
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/dok.py", line 140, in __getitem__
    raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices
-------------------- >> begin captured logging << --------------------
sknn: WARNING: WARNING: Computing estimates with an untrained network.
sknn: INFO: Initializing neural network with 1 layers, 4 inputs and 4 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  4   
sknn: DEBUG: 
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_Predict64 (sknn.tests.test_types.TestScipySparseMatrix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sknn/tests/test_types.py", line 69, in test_Predict64
    yp = self.nn._predict(X)
  File "/usr/local/lib/python2.7/dist-packages/sknn/mlp.py", line 262, in _predict
    return self._backend._predict_impl(X)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 273, in _predict_impl
    for Xb, _, _, idx  in self._iterate_data(self.batch_size, X, y, shuffle=False):
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
    Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
  File "/usr/local/lib/python2.7/dist-packages/sknn/backend/lasagne/mlp.py", line 293, in cast
    array = array[indices]
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/dok.py", line 140, in __getitem__
    raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices
-------------------- >> begin captured logging << --------------------
sknn: WARNING: WARNING: Computing estimates with an untrained network.
sknn: INFO: Initializing neural network with 1 layers, 4 inputs and 4 outputs.
sknn: DEBUG:   - Dense: Linear     Units:  4   
sknn: DEBUG: 
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 247 tests in 130.479s

FAILED (SKIP=10, errors=17)
@ghost
Copy link

ghost commented Jan 12, 2017

try the following steps:

sudo pip install scikit-learn==0.17
sudo pip install scipy==0.17.0
sudo pip install Theano==0.8.1
sudo pip install git+https://github.com/Lasagne/Lasagne.git@0440814#egg=Lasagne==0.2-dev
sudo pip install -U numpy
git clone https://github.com/aigamedev/scikit-neuralnetwork.git
cd scikit-neuralnetwork
sudo python setup.py develop

@riverhsu
Copy link

i got the same error while installing the latest version. I am working in Python 3.6.7 and Ubuntu 18.04.2 LTS. Following the guide, https://scikit-neuralnetwork.readthedocs.io/en/latest/guide_installation.html, I got these installed. Lasagne==0.2.dev1
nose==1.3.7
numpy==1.16.2
scikit-learn==0.20.3

Editable install with no version control (scikit-neuralnetwork==0.7)

-e /home/riverhsu/.local/share/virtualenvs/machinelearn-5MP7_ma5/lib/python3.6/site-packages
scipy==1.2.1
six==1.12.0
Theano==1.0.4

and here are the error replied.
nosetests -v sknn.tests
Failure: AttributeError (module 'sknn' has no attribute 'tests') ... ERROR

======================================================================
ERROR: Failure: AttributeError (module 'sknn' has no attribute 'tests')

Traceback (most recent call last):
File "/home/riverhsu/.local/share/virtualenvs/machinelearn-5MP7_ma5/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/riverhsu/.local/share/virtualenvs/machinelearn-5MP7_ma5/lib/python3.6/site-packages/nose/loader.py", line 407, in loadTestsFromName
module = resolve_name(addr.module)
File "/home/riverhsu/.local/share/virtualenvs/machinelearn-5MP7_ma5/lib/python3.6/site-packages/nose/util.py", line 322, in resolve_name
obj = getattr(obj, part)
AttributeError: module 'sknn' has no attribute 'tests'

can someone help on this ? please. Thanks.

@anyuanxx
Copy link

anyuanxx commented May 3, 2019

i got the same error, please help on this, Thanks.

Failure: AttributeError (module 'sknn' has no attribute 'tests') ... ERROR

======================================================================
ERROR: Failure: AttributeError (module 'sknn' has no attribute 'tests')

Traceback (most recent call last):
File "/home/shaw/anaconda3/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/shaw/anaconda3/lib/python3.7/site-packages/nose/loader.py", line 406, in loadTestsFromName
module = resolve_name(addr.module)
File "/home/shaw/anaconda3/lib/python3.7/site-packages/nose/util.py", line 322, in resolve_name
obj = getattr(obj, part)
AttributeError: module 'sknn' has no attribute 'tests'


Ran 1 test in 0.001s

FAILED (errors=1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants