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

TypeError?Need help #56

Open
Zerahhah opened this issue Dec 30, 2016 · 9 comments
Open

TypeError?Need help #56

Zerahhah opened this issue Dec 30, 2016 · 9 comments

Comments

@Zerahhah
Copy link

Zerahhah commented Dec 30, 2016

Dear andersbll,
I run it , but i got a typeerror.Python3.5
F:\mew\neural_artistic_style-master>python neural_artistic_style.py --subject images/1.jpg --style images/2.jpg
CUDArray: CUDA back-end not available, using NumPy.
Traceback (most recent call last):
File "neural_artistic_style.py", line 138, in
run()
File "neural_artistic_style.py", line 116, in run
args.smoothness)
File "F:\mew\neural_artistic_style-master\style_network.py", line 99, in init
next_subject = layer.fprop(next_subject)
File "F:\mew\neural_artistic_style-master\style_network.py", line 18, in fprop
y = self.conv_op.fprop(x, self.weights.array)
File "C:\Users\iDream\AppData\Local\Programs\Python\Python35\lib\site-packages\cudarray-0.1.dev0-py3.5-win-amd64.egg\cudarray\numpy_backend\nnet\conv.py", line 20, in fprop
convout = ca.empty(convout_shape, dtype=imgs.dtype)
TypeError: 'float' object cannot be interpreted as an integer

I am looking for your favorable reply at your convenience.Thank you.

@ak2703
Copy link

ak2703 commented Jan 21, 2017

Same error.

@haimengzhao
Copy link

haimengzhao commented Feb 3, 2017

Same error. Seeking for help. Thanks!

python3 neural_artistic_style.py --subject a.JPG --style images/starry_night.jpg
CUDArray: CUDA back-end not available, using NumPy.
Traceback (most recent call last):
File "neural_artistic_style.py", line 138, in
run()
File "neural_artistic_style.py", line 116, in run
args.smoothness)
File "/Users/minhui/Downloads/neural_artistic_style-master/style_network.py", line 99, in init
next_subject = layer.fprop(next_subject)
File "/Users/minhui/Downloads/neural_artistic_style-master/style_network.py", line 18, in fprop
y = self.conv_op.fprop(x, self.weights.array)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/cudarray-0.1.dev0-py3.6-macosx-10.6-intel.egg/cudarray/numpy_backend/nnet/conv.py", line 20, in fprop
convout = ca.empty(convout_shape, dtype=imgs.dtype)
TypeError: 'float' object cannot be interpreted as an integer

+++++++++++++++++++++++++++++++++++++++++++++
2 hours later:
I tried it again with python 2.7. It worked. I'm waiting for its iteration.

python neural_artistic_style.py --subject a.JPG --style images/starry_night.jpg
CUDArray: CUDA back-end not available, using NumPy.
Iteration: 0, cost: 43.4514
Iteration: 1, cost: 42.7667

@olliejday
Copy link

Same error

@TylerBohrer
Copy link

make sure that you have installed the right type of imagenet-vgg-verydeep-19.mat file since that what was causing the error for me.

@Zerahhah
Copy link
Author

@TylerBohrer
I checked its version before i put the issue, it was right. Now, i download the latest version(30-Sep-2016), but i get the same error.
imagenet-vgg-verydeep-19.mat
And what is your type of imagenet-vgg-verydeep-19.mat ?

@fcyf
Copy link

fcyf commented Mar 26, 2017

@TylerBohrer
Same error,I dowload it from http://www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat
and file checksums is same.
$ md5sum imagenet-vgg-verydeep-19.mat
106118b7cf60435e6d8e04f6a6dc3657 imagenet-vgg-verydeep-19.mat

@AdrienLF
Copy link

Same error, on mac, NOT using CUDA back end.

@fPrager
Copy link

fPrager commented Nov 18, 2017

Same Error here on windows, also not using cuda.

@fPrager
Copy link

fPrager commented Nov 18, 2017

maybe I found my problem, I had to change the numpy module to version 1.11.0
if I run the program now it also warns about this error in newer versions:
"VisibleDepricationWarning: using a non-integer instead of an integer will result in an error in the future"
---> keep in mind, that if you would have the cuda back end, it wouldn't use the numpy-stuff and you don't have to change the version

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

8 participants