Giter Club home page Giter Club logo

Comments (8)

naikzinal avatar naikzinal commented on July 23, 2024

dear @padenr you need to update yr theanorc file :
[global]
floatX=float32
it may solve the error.

from personality-detection.

padenr avatar padenr commented on July 23, 2024

I actually did that before and I got this other error. So I wasn't sure whether I was supposed to keep that line in or not. Based on your advice I assume it should be. But what about this error? This error only engages when I add the above to my .theanorc.

loading data... data loaded!
model architecture: CNN-static
using: word2vec vectors
[('image shape', 153, 300), ('filter shape', [(200, 1, 1, 300), (200, 1, 2, 300), (200, 1, 3, 300)]), ('hidden_units', [200, 200, 2]), ('dropout', [0.5, 0.5, 0.5]), ('batch_size', 50), ('non_static', False), ('learn_decay', 0.95), ('conv_non_linear', 'relu'), ('non_static', False), ('sqr_norm_lim', 9), ('shuffle_batch', True)]
Traceback (most recent call last):
File "conv_net_train.py", line 476, in
activations=[Sigmoid])
File "conv_net_train.py", line 123, in train_conv_net
conv_feats, _ = theano.scan(fn= convolve_user_statuses, sequences= layer0_input)
File "/home/rumsey_pr/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan.py", line 773, in scan
condition, outputs, updates = scan_utils.get_updates_and_outputs(fn(*args))
File "conv_net_train.py", line 115, in convolve_user_statuses
layer1_inputs.append(conv_layer.set_input(input=relv_input).flatten(2))
File "conv_net_classes.py", line 393, in set_input
conv_out = conv.conv2d(input=input, filters=self.W,filter_shape=self.filter_shape, image_shape=self.image_shape)
File "/home/rumsey_pr/anaconda2/lib/python2.7/site-packages/theano/tensor/nnet/conv.py", line 153, in conv2d
return op(input, filters)
File "/home/rumsey_pr/anaconda2/lib/python2.7/site-packages/theano/gof/op.py", line 615, in call
node = self.make_node(*inputs, **kwargs)
File "/home/rumsey_pr/anaconda2/lib/python2.7/site-packages/theano/tensor/nnet/conv.py", line 655, in make_node
"inputs(%s), kerns(%s)" % (_inputs.dtype, _kerns.dtype))
NotImplementedError: The image and the kernel must have the same type.inputs(float64), kerns(float32)

from personality-detection.

naikzinal avatar naikzinal commented on July 23, 2024

dear @padenr , i also have the same issue. i also got the same error if u able to solve please give me solution too.

from personality-detection.

padenr avatar padenr commented on July 23, 2024

I managed to get rid of this error by going into conv_net_classes.py and changing line 393 (give or take a line in mine) from

    conv_out = conv.conv2d(input=input, filters=self.W,filter_shape=self.filter_shape, image_shape=self.image_shape)

to

    conv_out = conv.conv2d(input=T.cast(input, theano.config.floatX), filters=self.W,filter_shape=self.filter_shape, image_shape=self.image_shape)

where floatX = float32 in my theanorc file.

Doing this gets it to the actual training phase. BUT the training will never finish. I watched it run for a few hours hoping it would work and it never did. Please tell me if you can get it to work. And if you do what hardware you are running your CNN on.

from personality-detection.

naikzinal avatar naikzinal commented on July 23, 2024

dear @padenr thank you so much for given the soluation.
but while running the code i found the memory issue.my training phase was not start.

loading data... data loaded!
model architecture: CNN-static
using: word2vec vectors
[('image shape', 153, 300), ('filter shape', [(200, 1, 1, 300), (200, 1, 2, 300), (200, 1, 3, 300)]), ('hidden_units', [200, 200, 2]), ('dropout', [0.5, 0.5, 0.5]), ('batch_size', 50), ('non_static', False), ('learn_decay', 0.95), ('conv_non_linear', 'relu'), ('non_static', False), ('sqr_norm_lim', 9), ('shuffle_batch', True)]
... training
Traceback (most recent call last):
File "conv_net_train.py", line 477, in
activations=[Sigmoid])
File "conv_net_train.py", line 221, in train_conv_net
cost_epoch = train_model(minibatch_index)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 606, in call
storage_map=self.fn.storage_map)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 595, in call
outputs = self.fn()
MemoryError:
Apply node that caused the error: AdvancedSubtensor1(Words, Elemwise{Cast{int32}}.0)
Inputs types: [TensorType(float64, matrix), TensorType(int32, vector)]
Inputs shapes: [(30392, 300), (2386800,)]
Inputs strides: [(2400, 8), (4,)]
Inputs values: ['not shown', 'not shown']

HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

from personality-detection.

padenr avatar padenr commented on July 23, 2024

Hmm. I didn't get that one so I don't really know honestly. I imagine since we've gotten most of the same errors that I should get this one too. But I don't know.

from personality-detection.

naikzinal avatar naikzinal commented on July 23, 2024

heloo @padenr can u tell me how u install the THEANO in anaconda environment ?
i think the error is occur bcz of incomplete installation of theano packege.

from personality-detection.

padenr avatar padenr commented on July 23, 2024

You're computer doesn't have enough RAM to run the program.

from personality-detection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.