Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

new style transfer error (just recently started happening) #283

Open
400lbhacker opened this issue Apr 1, 2021 · 5 comments
Open

new style transfer error (just recently started happening) #283

400lbhacker opened this issue Apr 1, 2021 · 5 comments

Comments

@400lbhacker
Copy link

style transfer example requires content and style photo to be both same sized (800x,533) for example, and it requires they are in jpeg format with no transperency layer. following these rules, just recently the style transfer example no longe works. this is the error im receiving

Dimension 0 in both shapes must be equal, but are 800 and 533. Shapes are [800,533,3] and [533,800,3].
From merging shape 0 with other shapes. for 'stack_1' (op: 'Pack') with input shapes: [800,533,3], [533,800,3], [533,800,3].

@au5tr1ng3r
Copy link

au5tr1ng3r commented Apr 5, 2021

I'm having exactly the same problem. AND if you get the dimensions of content and style the same e.g., 1000 x 1000 px this error during the optimization: TypeError: inner() got an unexpected keyword argument 'difference_to' I think some depreciated tf code kicked in? There were warnings.

@400lbhacker
Copy link
Author

400lbhacker commented Apr 5, 2021

found a temporary fix:
launch a python 2.7 env using the following link below, than import the code into it and run, it than works
https://colab.research.google.com/notebook#create=true&language=python2

here is my working example below based off my repository(https://github.com/400lbhacker/beast-pytorch-tensorflow-neural-style-transfer)
https://colab.research.google.com/drive/1IgiqQ5dN5G2W2ntrNRtxOpeC1SY95GPn

@400lbhacker
Copy link
Author

I have resolved this issue, I can patch any lucid project one is working on if you email me: josepherickson135@gmail.com, I cannot post to github due to the nature of the way colab is begging to default on py3 but i have a private repository that is pre configured that i can share as an example. I will update my beast neural style repository (based off lucid) with this snippet of info soon. have wonderful day ^-^

@au5tr1ng3r
Copy link

Thanks mate! Works perfect.

@400lbhacker
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants