GuidoPaul / Android-Tensorflow-Style-Transfer

Based on tensorflow's style transfer Android project.
18 stars 7 forks source link

How to change used .pb file? #2

Open azemZejnil opened 6 years ago

azemZejnil commented 6 years ago

When I try to change .pb file that you use in the project, I get java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=null} to activity {com.guido.styletransfer/com.guido.styletransfer.MainActivity}: java.lang.IllegalArgumentException: No Operation named [input] in the Graph

Caused by: java.lang.IllegalArgumentException: No Operation named [input] in the Graph

Can you explain that part, please?

GuidoPaul commented 6 years ago

In this project, I generated style_graph_frozen.pb. You can look at style-transfer.py, which requires an input placeholder named "X_inputs" and an output placeholder named "output". But now MainActivity.java uses the pb of another project, which is frozen_la_muse.pb. It requires an INPUT_NODE named "input" and an OUTPUT_NODE named "output".

Therefore, when you use different pb files, you need to know the input and output node names that you need in your pb file, and then modify INPUT_NODE and OUTPUT_NODE in MainActivity.java.

USTC-Keyanjie commented 5 years ago

Can you share the another project which you used to train model, please! I have fixed my model for a week in order to use it in the project but never work.

GuidoPaul commented 5 years ago

I have shared it in the “style-transfer” directory of Android-Tensorflow-Style-Transfer

柯延杰 notifications@github.com 于2019年1月27日周日 下午10:39写道:

Can you share the another project which you used to train model, please! I have fixed my model for a week in order to use it in the project but never work.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GuidoPaul/Android-Tensorflow-Style-Transfer/issues/2#issuecomment-457923330, or mute the thread https://github.com/notifications/unsubscribe-auth/AGJLK_UzmcdyrIo2K7RErIVS4mS2Raq1ks5vHbo8gaJpZM4TC-8f .