Tensorflowで組んだ学習モデルをe-AIトランスレータで変換をかけた結果、
トランスレータに失敗してしまいます。
logの内容は以下の通りです。
[2021-08-17 15:54:24,814 INFO node_name.py:326 - node_names() ]Possible input and output node names are estimated. The User can choose the node names from the same to freeze the model.
[2021-08-17 15:54:41,428 INFO network_decoder_tensorflow.py:265 - generate_network() ] The tensorflow model from 'E:\e2studio\aimodel_higoushi'' is being converted to protobuf format.[2021-08-17 15:54:45,642 INFO network_decoder_tensorflow.py:291 - generate_network() ] Freezing the model..
Following is a list of possible node names:
Input node names :PlaceholderPlaceholder_1Reshapetruncated_normal/multruncated_normalVariable/AssignVariable/readVariable_1/AssignVariable_1/readReshape_1
Output node names :Conv2D_3add_9Sigmoid
The model is freezed by considering the output node name as 'sub'.The input_node_name is : Placeholder
145 ops in the final graph.
[2021-08-17 15:54:45,750 INFO tftranslate_utils.py:1218 - check_for_input_shape() ] The input shape used in the tensorflow model is [1, 1, 4000, 1][2021-08-17 15:54:45,757 INFO network_decoder_tensorflow.py:364 - generate_network() ] The tensorflow frozen model is decoded..[2021-08-17 15:54:49,596 INFO weights_generator_tensorflow.py:602 - generate_weights_and_biases() ] The tensorflow frozen model is read and the layer-wise weights and biases are stored in 'E:\e2studio\workspace_20210810\norti_rzt1\src\Translator\weights.h' .[2021-08-17 15:54:53,003 INFO code_generator.py:1450 - <module>() ] Currently running version: v160[2021-08-17 15:54:53,160 ERROR requirements.py:183 - log_exception() ] eAI-501 : Uncaught ExceptionAn unhandled exception has caused this script to terminate prematurely. Here are the details :
C:\Users\junkun0804\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_qint8 = np.dtype([("qint8", np.int8, 1)])C:\Users\junkun0804\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_quint8 = np.dtype([("quint8", np.uint8, 1)])C:\Users\junkun0804\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_qint16 = np.dtype([("qint16", np.int16, 1)])C:\Users\junkun0804\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_quint16 = np.dtype([("quint16", np.uint16, 1)])C:\Users\junkun0804\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'._np_qint32 = np.dtype([("qint32", np.int32, 1)])C:\Users\junkun0804\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.np_resource = np.dtype([("resource", np.ubyte, 1)])Traceback (most recent call last):File ".\bin\code_generator.py", line 1454, in <module>File ".\bin\code_generator.py", line 1337, in generate_codeFile ".\bin\error_code.py", line 37, in reraiseFile ".\bin\code_generator.py", line 1333, in generate_codeFile ".\bin\code_generator.py", line 792, in generate_c_headerFile ".\bin\error_code.py", line 37, in reraiseFile ".\bin\code_generator.py", line 788, in generate_c_headerFile ".\bin\tensorflow_dep\network_builder_tensorflow.py", line 414, in generate_layer_shapesFile ".\bin\tensorflow_dep\network_builder_tensorflow.py", line 414, in <listcomp>KeyError: 'Placeholder_1_0'
[2021-08-17 15:54:53,161 INFO requirements.py:184 - log_exception() ] Translation FAILED!![2021-08-17 15:54:53,162 INFO requirements.py:155 - remove_object() ] Uninitializing and cleaning up the translator object..
Input Model Locationで指定したフォルダ内を確認しましたが、必要とされている4つのファイルは
保管してありました。(Tensorflowにてtf.train.Saver()を使用して、モデルを保存しました)
【使用環境】 e2studio(v6.3.0)+ e-AIトランスレータ v1.6.0
【Tensorflow】 v.1.14.0
なにかエラーログの内容からお気づきの点があれば、アドバイスいただけると幸いです。
ちなみに、サンプルとして提示されている下記のパイソンコードでは正常にトランスレートすることが出来ました。
(環境はすべて同じです)
gadget.renesas.com/.../mnist_tutorial.html→ページ内の「mnist_softmax_for_e-ai.py」
よろしくお願いします。