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

indentation issues with python3 #4

Open
improvethings opened this issue Jan 18, 2021 · 6 comments
Open

indentation issues with python3 #4

improvethings opened this issue Jan 18, 2021 · 6 comments

Comments

@improvethings
Copy link

$ unzip -d model inception5h.zip
Archive: inception5h.zip
inflating: model/imagenet_comp_graph_label_strings.txt
inflating: model/tensorflow_inception_graph.pb
inflating: model/LICENSE
$ python pb_dreamer.py --input_image input.png
File "pb_dreamer.py", line 120
g = calc_grad_tiled(img, t_grad, tile_size)
^
$ python -V
Python 3.7.3

@aertist
Copy link

aertist commented Jan 25, 2021

You got any solution for this?

@ProGamerGov
Copy link
Owner

ProGamerGov commented Jan 27, 2021

I have no idea what is causing the error for the both of you, but you can submit a PR if you figure a fix!

Maybe there are a combination of tabs and spaces or something like that? But tabs + spaces would throw a different error I think.

@aertist
Copy link

aertist commented Jan 27, 2021

I have no idea what is causing the error for the both of you, but you can submit a PR if you figure a fix!

Maybe there are a combination of tabs and spaces or something like that? But tabs + spaces would throw a different error I think.

I made a colab notebook for this. Can you tell which python version you used for this code?

Is the neural-dream repo extended version of this? I saw a tiling feature in that too.
Is there any difference between these two?

@ProGamerGov ProGamerGov mentioned this issue Jan 27, 2021
@ProGamerGov
Copy link
Owner

I probably used Python2.7 as this project is really old. The neural-dream project is a completely different project completely designed by me and written in PyTorch. Protobuf-Dreamer is really old and likely very much out of date these days.

@aertist
Copy link

aertist commented Jan 27, 2021

Dude this is hella slow. 💀
But it is working now.
You can add some lines in readme file like:

Environment Used Was:

  • Python==3.x
  • Tensorflow==1.x
  • scipy==1.2.0 (beacause imread is deprecated in the latest scipy versions)

Edit

Now its showing this error:
Iteration Number: 0 Iteration Number: 1 Iteration Number: 2 Octave Number: 0 Iteration Number: 0 Iteration Number: 1 Iteration Number: 2 Octave Number: 1 Iteration Number: 0 Iteration Number: 1 Iteration Number: 2 Octave Number: 2 Traceback (most recent call last): File "pb_dreamer.py", line 152, in <module> imsave(output_name, output_img) File "/usr/local/lib/python3.6/dist-packages/skimage/io/_io.py", line 129, in imsave if arr.dtype == bool: AttributeError: 'Image' object has no attribute 'dtype'

You can click the same colab notebook to reproduce the error.
Maybe this is because of the scipy version? Can you tell which scipy version you tested this with? 👀

I think this is a scikit-image issue

@ProGamerGov
Copy link
Owner

Try replacing scipy with skimage like I used here: https://github.com/ProGamerGov/Neural-Tools/blob/master/linear-color-transfer.py

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

3 participants