Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training error 'module' object has no attribute 'downsample' #28

Open
VirginiaMenezes opened this issue Oct 15, 2017 · 5 comments
Open

Comments

@VirginiaMenezes
Copy link

When I am trying to run the train.py file for training, I am getting the error 'module' object has no attribute 'downsample'
I read that downsample in theano.tensor.signal import downsample has been moved to pool module.
But which function is equivalent in pool is equivalent to DownsampleFactorMax in downsample.

Please help ASAP.

Traceback (most recent call last):
  File "train.py", line 182, in <module>
    main(args)
  File "train.py", line 135, in main
    tfuncs, tvars = make_training_functions(cfg, model)
  File "train.py", line 31, in make_training_functions
    out = lasagne.layers.get_output(l_out, X)
  File "/usr/local/lib/python2.7/dist-packages/lasagne/layers/helper.py", line 185, in get_output
    all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
  File "/home/nvidia/virginia/voxnet/voxnet/layers.py", line 244, in get_output_for
    out = max_pool_3d(input, self.pool_shape)
  File "/home/nvidia/virginia/voxnet/voxnet/max_pool_3d.py", line 72, in max_pool_3d
    op = T.signal.downsample.DownsampleFactorMax((ds[1], ds[2]), ignore_border)
AttributeError: 'module' object has no attribute 'downsample'

@VirginiaMenezes VirginiaMenezes changed the title Training error **'module' object has no attribute 'downsample'** Training error 'module' object has no attribute 'downsample' Oct 15, 2017
@CATHUR
Copy link

CATHUR commented Dec 17, 2017

I also encountered this situation, and I changed the source code as follows:
op = T.signal.pool.Pool((ds[1], ds[2]), ignore_border)

@stephencuinujia
Copy link

I got
ValueError: Pool mode parameter only support 'max', 'sum', 'average_inc_pad' and 'average_exc_pad'. Got False

After change to
op = T.signal.pool.Pool((ds[1], ds[2]), ignore_border)

Any idea?

@merium
Copy link

merium commented Mar 21, 2018

I solved the same issue by switching to theano 0.8.2

@buemi
Copy link

buemi commented May 7, 2018

I solved this issue in theano 1.0.1 by replacing the following statements:

op = T.signal.downsample.DownsampleFactorMax((ds[1], ds[2]), ignore_border)
output = op(input_4D)

with these:

op = T.signal.pool.Pool(ignore_border)
output = op(input_4D, ws=(ds[1], ds[2]))

And the other call to DownsampleFactorMax in the same way.

@claell
Copy link

claell commented Nov 8, 2019

This is apparently caused by Theano moving downsample to a different package. I think Lasagne 0.1 uses the old location, which only works with Theano 0.8.2 or lower. Unfortunately there does not seem to be a more updated version of Lasagne.

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

No branches or pull requests

6 participants