-
Notifications
You must be signed in to change notification settings - Fork 134
Execution error #59
Comments
For the first issue, I think something with API changed that altered the shape of the input image. I will push an update. But seems like all you need to do is change the reshape line (line 26) to For the second issue, I am not too sure, I was able to build and run the app okay with the latest Android Studio and supported gradle version (5.6.4). Try seeing if you have the latest versions. I will also push a commit updating the version in the gradle build file. |
Thanks for the answer. |
@pvaneck I'm sorry to ask you same problem. I changed gradle version like this. But I have the same problem. In my opinion, maybe it is a pb file loading problem. Is there any other solution? I'll wait your answer :) |
Sorry, I was using the I did get the same error when trying to use the model just trained with a fresh install. Seems like it has to do with a version mismatch between the Python TensorFlow and the Android TensorFlow AAR file. Version 1.15.2 of TF is used while the highest version available for the TensorFlow AAR is 1.13.1 for the TensorFlow AAR. My suggestion is to use the 1.13.1 version of TF for training and saving. Sorry about that! I went ahead |
Thank you very much for the answer. My tensorflow version is 1.15.2, but there is no way to apply this version. I should try again with 1.13.1 :) |
When I train the model and try the model with 'classify-hangul.py', I get the following error:
ValueError: Cannot feed value of shape (4096,) for Tensor 'hangul-model / input: 0', which has shape '(?, 4096)'.
If I ignore this problem and run it with 'optimized_hangul_tensorflow.pb' in the android asset folder, I get the following error:
java.lang.RuntimeException: Error loading pre-trained model.
Caused by: java.lang.RuntimeException: Failed to load model from 'new_hangul.pb'
Caused by: java.io.IOException: Not a valid TensorFlow Graph serialization: NodeDef mentions attr 'explicit_paddings' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_BFLOAT16, DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]; attr=dilations:list(int),default=[1, 1, 1, 1]>; NodeDef: {{node Conv2D}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
How can I solve this problem?
The text was updated successfully, but these errors were encountered: