Closed s4sarath closed 8 years ago
Can you please show a stack trace? And also which version of scikit learn do you have? It seems like older versions had the different semantics of array checking.
Give me half an hour...
TypeError Traceback (most recent call last)
It seems like the data type of X_train is not understood by check_array. Can you print the type(X_train) and X_train.dtype? It supposes to be a 2-dimensional numpy matrix of dtype.float32. And you are running the same code as in text_classification.py or modified - if yes, can you show what you modified?
type(X_train) => numpy.ndarray X_train.dtype => dtype('int64')
@ilblackdragon - I have converted X_train as you mentioned by , X_train.astype('float32') . But still the same error . It is 2d array of size (560000, 10) .
@ilblackdragon - I am running the same code as in text_classififcation.py . As I am new to tensorflow , I thought if starting from the examples you have provided .
Ok, so I reproduced the issue with sklearn 0.16.1. Quick fix for you to update your sklearn to 0.17. I'll in a meanwhile try to find what is the difference.
Ok I will do that , now . Thanks .
@ilblackdragon - Still no help . I ugraded scikit-learn to 0.17 . Still it is giving the same error .
I have encountered this problem, and upgrading to 0.17 did solve the problem. So, @s4sarath could you try to remove scikit-learn and re-install 0.17. Maybe there are multiple installations of scikit in your system and python is not picking up the latest version.
I have uninstalled using pip and upgrade using pip . let me try once more . On 27 Nov 2015 12:48, "ylhsieh" notifications@github.com wrote:
I have encountered this problem, and upgrading to 0.17 did solve the problem. So, @s4sarath https://github.com/s4sarath could you try to remove scikit-learn and re-install 0.17. Maybe there are multiple installations of scikit in your system and python is not picking up the latest version.
— Reply to this email directly or view it on GitHub https://github.com/google/skflow/issues/11#issuecomment-160057612.
Hi guys . it is working after updating sklearn to 0.17 . if anyone updating , please make sure that you have removed all the previous version from site-packages . On 27 Nov 2015 13:03, "sarath r nair" s4sarath@gmail.com wrote:
I have uninstalled using pip and upgrade using pip . let me try once more . On 27 Nov 2015 12:48, "ylhsieh" notifications@github.com wrote:
I have encountered this problem, and upgrading to 0.17 did solve the problem. So, @s4sarath https://github.com/s4sarath could you try to remove scikit-learn and re-install 0.17. Maybe there are multiple installations of scikit in your system and python is not picking up the latest version.
— Reply to this email directly or view it on GitHub https://github.com/google/skflow/issues/11#issuecomment-160057612.
FYI - I've fixed this issue and also started running tests with sklearn 0.16 (will add it for CI as well). Thanks for raising it!
Good thing man . thanks . On 28 Nov 2015 10:10, "Illia Polosukhin" notifications@github.com wrote:
Hey guy, just FYI - I've fixed this issue and also started running tests with sklearn 0.16 (will add it for CI as well). Thanks for raising it!
— Reply to this email directly or view it on GitHub https://github.com/google/skflow/issues/11#issuecomment-160248271.
All the passed Parameter shape is correct . i have cross validated that .