热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

FailtoconvertaTFmodeltocaffe2orPytorch

Platform(likeubuntu16.04/win10):Ubuntu16.04Pythonversion:Python3.5.5

Platform (like ubuntu 16.04/win10): Ubuntu 16.04

Python version: Python 3.5.5

Source framework with version (like Tensorflow 1.4.1 with GPU): Tensorflow 1.10.1 with GPU

Destination framework with version (like CNTK 2.3 with GPU): Caffe2 with CPU / Pytorch 0.4.1 with GPU

Pre-trained model path (webpath or webdisk path): No web path. It is a pre-trained cnn model in tensorflow

Error:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#:$ mmconvert -sf tensorflow -in cnn_tree.ckpt-51243.meta -iw cnn_tree.ckpt-51243 --dstNodeName output/Softmax -df pytorch -om tf2pytorch

/anaconda/envs/py35/lib/python3.5/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.

  from ._conv import register_converters as _register_converters

Parse file [cnn_tree.ckpt-51243.meta] with binary format successfully.

Tensorflow model file [cnn_tree.ckpt-51243.meta] loaded successfully.

Tensorflow checkpoint file [cnn_tree.ckpt-51243] loaded successfully. [21] variables loaded.

Tensorflow has not supported operator [Cast] with name [network/conv_layer/conv_node/conv_step/coefficients/coef_r/Cast].

Tensorflow has not supported operator [Cast] with name [network/conv_layer/conv_node/conv_step/coefficients/coef_l/Cast].

Tensorflow has not supported operator [Less] with name [network/conv_layer/conv_node/conv_step/combine/Tensordot/Less].

Tensorflow has not supported operator [ExpandDims] with name [network/conv_layer/conv_node/conv_step/trees/children_tensor/ExpandDims].

Tensorflow has not supported operator [ExpandDims] with name [network/conv_layer/conv_node/conv_step/trees/ExpandDims].

Tensorflow has not supported operator [GreaterEqual] with name [network/conv_layer/conv_node/conv_step/combine/Tensordot/GreaterEqual].

Tensorflow has not supported operator [Range] with name [network/conv_layer/conv_node/conv_step/combine/Tensordot/range].

Tensorflow has not supported operator [NotEqual] with name [network/conv_layer/conv_node/conv_step/coefficients/coef_r/count_nonzero/NotEqual].

Tensorflow has not supported operator [Cast] with name [network/conv_layer/conv_node/conv_step/combine/Tensordot/Cast_1].

Tensorflow has not supported operator [Cast] with name [network/conv_layer/conv_node/conv_step/combine/Tensordot/Cast].

Tensorflow has not supported operator [Cast] with name [network/conv_layer/conv_node/conv_step/coefficients/coef_r/count_nonzero/ToInt64].

Tensorflow has not supported operator [Fill] with name [network/conv_layer/conv_node/conv_step/coefficients/coef_r/ones].

Tensorflow has not supported operator [Fill] with name [network/conv_layer/conv_node/conv_step/coefficients/coef_l/ones].

Traceback (most recent call last):

  File "/home/ccrmad/.local/bin/mmconvert", line 11, in

    sys.exit(_main())

  File "/home/ccrmad/.local/lib/python3.5/site-packages/mmdnn/conversion/_script/convert.py", line 102, in _main

    ret = convertToIR._convert(ir_args)

  File "/home/ccrmad/.local/lib/python3.5/site-packages/mmdnn/conversion/_script/convertToIR.py", line 115, in _convert

    parser.run(args.dstPath)

  File "/home/ccrmad/.local/lib/python3.5/site-packages/mmdnn/conversion/common/DataStructure/parser.py", line 22, in run

    self.gen_IR()

  File "/home/ccrmad/.local/lib/python3.5/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py", line 309, in gen_IR

    func(current_node)

  File "/home/ccrmad/.local/lib/python3.5/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py", line 703, in rename_Mul

    shape = shape[-1]

IndexError: list index out of range


There are a lot of

1
not supported operator

s, and thus the reason the failure?

该提问来源于开源项目:microsoft/MMdnn

hi, i got the same err, did you solve the problem ?





   



推荐阅读
  • Python爬虫中使用正则表达式的方法和注意事项
    本文介绍了在Python爬虫中使用正则表达式的方法和注意事项。首先解释了爬虫的四个主要步骤,并强调了正则表达式在数据处理中的重要性。然后详细介绍了正则表达式的概念和用法,包括检索、替换和过滤文本的功能。同时提到了re模块是Python内置的用于处理正则表达式的模块,并给出了使用正则表达式时需要注意的特殊字符转义和原始字符串的用法。通过本文的学习,读者可以掌握在Python爬虫中使用正则表达式的技巧和方法。 ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • 关于如何快速定义自己的数据集,可以参考我的前一篇文章PyTorch中快速加载自定义数据(入门)_晨曦473的博客-CSDN博客刚开始学习P ... [详细]
  • 本文由编程笔记#小编为大家整理,主要介绍了logistic回归(线性和非线性)相关的知识,包括线性logistic回归的代码和数据集的分布情况。希望对你有一定的参考价值。 ... [详细]
  • Java序列化对象传给PHP的方法及原理解析
    本文介绍了Java序列化对象传给PHP的方法及原理,包括Java对象传递的方式、序列化的方式、PHP中的序列化用法介绍、Java是否能反序列化PHP的数据、Java序列化的原理以及解决Java序列化中的问题。同时还解释了序列化的概念和作用,以及代码执行序列化所需要的权限。最后指出,序列化会将对象实例的所有字段都进行序列化,使得数据能够被表示为实例的序列化数据,但只有能够解释该格式的代码才能够确定数据的内容。 ... [详细]
  • [大整数乘法] java代码实现
    本文介绍了使用java代码实现大整数乘法的过程,同时也涉及到大整数加法和大整数减法的计算方法。通过分治算法来提高计算效率,并对算法的时间复杂度进行了研究。详细代码实现请参考文章链接。 ... [详细]
  • WhenIusepythontoapplythepymysqlmoduletoaddafieldtoatableinthemysqldatabase,itdo ... [详细]
  • IjustinheritedsomewebpageswhichusesMooTools.IneverusedMooTools.NowIneedtoaddsomef ... [详细]
  • IOS开发之短信发送与拨打电话的方法详解
    本文详细介绍了在IOS开发中实现短信发送和拨打电话的两种方式,一种是使用系统底层发送,虽然无法自定义短信内容和返回原应用,但是简单方便;另一种是使用第三方框架发送,需要导入MessageUI头文件,并遵守MFMessageComposeViewControllerDelegate协议,可以实现自定义短信内容和返回原应用的功能。 ... [详细]
  • Window10+anaconda+python3.5.4+ tensorflow1.5+ keras(GPU版本)安装教程 ... [详细]
  • vb.net不用多线程如何同时运行两个过程?不用多线程?即使用多线程,也不会是“同时”执行,题主只要略懂一些计算机编译原理就能明白了。不用多线程更不可能让两个过程同步执行了。不过可 ... [详细]
  • 在 IMDB 情感分类任务上训练双向 LSTM
    代码如下在这里插入代码片from__future__importprint_functionimportnumpyasnpfromkeras.preprocessingimpo ... [详细]
  • 还记得这首是什么歌吗?
    作词:MahmoudJaff,作曲:MahmoudJaff,Timeisthecurrencyofyourlife,spenditwiselyÿ ... [详细]
  • java多线程获取线程返回结果
    我们在使用java多线程编写相关业务代码时,往往有这样一种情况,某个线程依赖于其他线程执行结果。也就是说,我们需要在一个线程中获取另一个线程的信息。可以分为两种情况,一种是轮询,一 ... [详细]
  • python中不同的异常类型,如何进行异常处理?
    一、错误与异常程序中难免会出现错误,而错误分为两种1.语法错误:(这种错误,根本过不了python解释器的语法检测,必须在程序执行前就改正)2.逻辑错误:(逻辑错误),比如用户输入 ... [详细]
author-avatar
强子
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有