Hi,

You seem to be initializing both the new back-end and the old back-end
at the same time, which is not really supported.

Regarding the NotImplementedError, it is raised when calling T.min()
on something that is neither a signed int nor a float, as it currently
instantiates (-T.max(-x)), which may not be safe.

Here, the argument is the output of T.neq(...), which used to return an
int8, but now returns a bool.

I think the easiest fix for that code would be to use boolean operations
instead of min(), since the equivalent would be all(...).
The following should all work:

  T.mean(T.neq(y_pred_top_x, y_top_x).all(axis=1))
  T.mean(T.min(T.neq(y_pred_top_x, y_top_x).astype('int8'), axis=1))

On Tue, Mar 28, 2017, Deepali Patel wrote:
> Hello,
> 
> While executing alexnet with theano v0.9.0 I observed the following error:
> 
> THEANO_FLAGS=mode=FAST_RUN,floatX=float32 python train.py
> WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be 
> removed in the next release (v0.10).  Please switch to the gpuarray 
> backend. You can get more information about how to switch at this URL:
>  
> https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
> 
> Using cuDNN version 5105 on context None
> Mapped name None to device cuda: Tesla K80 (0004:03:00.0)
> Using gpu device 0: Tesla K80 (CNMeM is disabled, cuDNN 5105)
> ... building the model
> conv (cudnn) layer with shape_in: (3, 227, 227, 128)
> conv (cudnn) layer with shape_in: (96, 27, 27, 128)
> conv (cudnn) layer with shape_in: (256, 13, 13, 128)
> conv (cudnn) layer with shape_in: (384, 13, 13, 128)
> conv (cudnn) layer with shape_in: (384, 13, 13, 128)
> fc layer with num_in: 9216 num_out: 4096
> dropout layer with P_drop: 0.5
> fc layer with num_in: 4096 num_out: 4096
> dropout layer with P_drop: 0.5
> softmax layer with num_in: 4096 num_out: 1000
> Process Process-1:
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in 
> _bootstrap
>     self.run()
>   File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
>     self._target(*self._args, **self._kwargs)
>   File "train.py", line 54, in train_net
>     model = AlexNet(config)
>   File "<pathto>/alexnet-theano/alex_net.py", line 130, in __init__
>     self.errors_top_5 = softmax_layer8.errors_top_x(y, 5)
>   File "./lib/layers.py", line 312, in errors_top_x
>     return T.mean(T.min(T.neq(y_pred_top_x, y_top_x), axis=1))
>   File "<pathto>/site-packages/theano/tensor/basic.py", line 1742, in min
>     raise NotImplementedError()
> NotImplementedError
> 
> 
> Please let me know if there is a known solution to this issue.
> 
> Regards
> Deepali 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "theano-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.


-- 
Pascal

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to