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

How to use and predict all the five traits? #1

Closed
JafferWilson opened this issue Sep 11, 2017 · 31 comments
Closed

How to use and predict all the five traits? #1

JafferWilson opened this issue Sep 11, 2017 · 31 comments

Comments

@JafferWilson
Copy link

Hi,
I was just going through your repository and I like the way you have explain regarding the project. But I can see while training we are just passing one traits number; for example in your sample you have used 2 code and started the training. But what if for others?

Also you have not mentioned anything related to the model usage after training. Kindly answer the questions I have.
Thank you in advance.

@JafferWilson
Copy link
Author

Is there any one please guide me?

@SenticNet SenticNet self-assigned this Sep 12, 2017
@SenticNet
Copy link
Collaborator

Dear Jaffer,

Sorry for belated response. We were all busy with AAAI submissions. The param to select different trait varies from 0 to 4.

@JafferWilson
Copy link
Author

Yes I understood that the param are from 0 to 4. But I see only this statement:
python conv_layer_train.py -static -word2vec 2

which I guess is for training only. How the predict statement works. Kindly add it in the Read.me file of your repository.
All the Best for your Submissions.

@advanced4
Copy link

Second'ing Jaffer's comment;

Your readme only contains instructions for pre-processing & training. Could you update it to reflect how to actually detect personality traits when given text data?

@JafferWilson
Copy link
Author

@advanced4 I didn't got you. Can you please make me understand what you in need of?

@naikzinal
Copy link

@JafferWilson you solve the python conv_layer_train.py -static -word2vec 2 ?
i got error
Traceback (most recent call last):
File "conv_net_train.py", line 476, in
activations=[Sigmoid])
File "conv_net_train.py", line 179, in train_conv_net
allow_input_downcast = True)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/function.py", line 266, in function
profile=profile)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 489, in pfunc
no_default_updates=no_default_updates)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 241, in rebuild_collect_shared
cloned_v = clone_v_get_shared_updates(outputs, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 92, in clone_v_get_shared_updates
clone_a(v.owner, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 131, in clone_a
clone_v_get_shared_updates(i, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 92, in clone_v_get_shared_updates
clone_a(v.owner, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 131, in clone_a
clone_v_get_shared_updates(i, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 92, in clone_v_get_shared_updates
clone_a(v.owner, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 131, in clone_a
clone_v_get_shared_updates(i, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 92, in clone_v_get_shared_updates
clone_a(v.owner, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 131, in clone_a
clone_v_get_shared_updates(i, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 92, in clone_v_get_shared_updates
clone_a(v.owner, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 131, in clone_a
clone_v_get_shared_updates(i, copy_inputs_over)
File "/home/zinal/.local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 92, in clone_v_get_shared_updates
clone_a(v.owner, copy_inputs_over)

can u please help me i did't understand the error .. i

@JafferWilson
Copy link
Author

JafferWilson commented Nov 10, 2017

@naikzinal What is the version of your Theano library?
I guess the issue is due to the recent library used, the updated one.

@naikzinal
Copy link

dear jafferWilson i have check my theano version still i have that issue .
can you please help me.
thank you

@JafferWilson
Copy link
Author

@naikzinal What is the version?

@naikzinal
Copy link

@JafferWilson theano 0.7

@naikzinal
Copy link

@JafferWilson but i dont understand the meaning theano 0.7(tested) what is the meaning of tested?

@JafferWilson
Copy link
Author

@naikzinal I guess, you need a fresh installation. Please try using some other system and then use it. I don't find any problem if your version is correct.

@naikzinal
Copy link

which kind of system you used for run the code? @JafferWilson

@JafferWilson
Copy link
Author

@naikzinal I have used my Virtual box or Virtual Machine with ubuntu 16.04(updated). What system you have tried?

@naikzinal
Copy link

i also use ubuntu 16.04. @JafferWilson

@JafferWilson
Copy link
Author

@naikzinal Try once again with fresh installation. Better use VM for your experiment then on the right machine.

@naikzinal
Copy link

ok i will try .
thank you

@naikzinal
Copy link

heloo, while running the conv_net_train.py i found the error

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 477, 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 "/usr/local/lib/python2.7/dist-packages/theano/scan_module/scan.py", line 745, 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 "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/conv.py", line 151, in conv2d
return op(input, filters)
File "/usr/local/lib/python2.7/dist-packages/theano/gof/op.py", line 507, in call
node = self.make_node(*inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/conv.py", line 628, 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)

please any one can help me.
thank you

@naikzinal
Copy link

dear @JafferWilson
heloo, while running the conv_net_train.py i found the error

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 477, 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 "/usr/local/lib/python2.7/dist-packages/theano/scan_module/scan.py", line 745, 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 "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/conv.py", line 151, in conv2d
return op(input, filters)
File "/usr/local/lib/python2.7/dist-packages/theano/gof/op.py", line 507, in call
node = self.make_node(*inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/conv.py", line 628, 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)

And i want to know that which device you used for run the code gpu or cpu?i think i have a problem in Theanorc file what is yr configuration for Theanorc file?
thank you

@JafferWilson
Copy link
Author

My system works on CPU and GPU. But I ran the process on CPU.

@naikzinal
Copy link

@JafferWilson ok, thank you for a reply.
what is your theanorc file configuration?

@radhikakuttala
Copy link

@JafferWilson Did you got output after running the conv_net_train.py? I am struck ed in this step.can you please help.

Thanks in advance.

@JafferWilson
Copy link
Author

@radhikakuttala I tried it way before.. Now I do not have anything. Frankly, its results wasted time. Hence, do not want to discuss about it. For your answer, yes I got the output.

@nitinbhardwaj2489
Copy link

Hi Guys

While running the conv_net_train.py I found the error

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 477, 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 "/usr/local/lib/python2.7/dist-packages/theano/scan_module/scan.py", line 745, 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 "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/conv.py", line 151, in conv2d
return op(input, filters)
File "/usr/local/lib/python2.7/dist-packages/theano/gof/op.py", line 507, in call
node = self.make_node(*inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/conv.py", line 628, 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)

I am using theano 0.7, pandas 0.18.0 and Python 2.7 ( which is mentioned in the read me file). I have tried all combinations of these three ( Python 2.7 and 3.5), Theano ( 0.7,0.8,0.9,1.0) and pandas( 0.18.0,0.22.0)

Can you help me with this issue ?
Also how can I use these to get all the five personality traits in one go using the trained model ?
Thanks for your help!
Nitin

@mr-yamraj
Copy link

@JafferWilson Are you able to find the answer to this issue? Can you please share it with us.

@ahmedabdelbadie
Copy link

this is exactly what i want @JafferWilson
how to use and predict all the five traits throws this code
if you found or create any solution for this problem

@mgene123
Copy link

mgene123 commented Jul 3, 2018

Hi @SenticNet i read your papers and do my effort to run the code but i have some questions
1)what is content of mairesse file and how get it
2)how use this code to get big five traits through text input

@mgene123
Copy link

mgene123 commented Jul 3, 2018

Hi @JafferWilson did you found any solution to your problem

@mgene123
Copy link

@SenticNet

@nmder
Copy link
Collaborator

nmder commented Jul 15, 2018

Please check the pre-processing section of readme to know about the generation of mairesse feature.

@nmder nmder closed this as completed Jul 15, 2018
@SenticNet SenticNet removed their assignment Oct 26, 2018
@sg1719
Copy link

sg1719 commented Feb 17, 2019

Hi @JafferWilson,
if you can help me please with the code used to predict the five traits using trained model.
@SenticNet

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

10 participants