0

If someone could help me I would be very very appreciate!

I would like to ask how about the conversion from .pth to .pb file.

Especially, I use MADDPG algorithm with pytorch and I have 4 .pth files.

How I can convert all of them and have one .pb file?

Firstly, I tried to convert one of my 4 .pth files to .pb file with these instructions

How can we convert a .pth model into .pb file?

but I receive this error.

C:\Python36\lib\site-packages\onnx_tf\common\__init__.py:89: UserWarning: 
onnx_tf.common.get_outputs_names is deprecated. It will be removed in future release. Use 
TensorflowGraph.get_outputs_names instead.
  warnings.warn(message)
Traceback (most recent call last):
  File "myscript.py", line 2, in <module>
    from onnx_tf.backend import prepare
  File "C:\Python36\lib\site-packages\onnx_tf\__init__.py", line 1, in <module>
    from . import backend
  File "C:\Python36\lib\site-packages\onnx_tf\backend.py", line 29, in <module>
   from onnx_tf.common.handler_helper import get_all_backend_handlers
  File "C:\Python36\lib\site-packages\onnx_tf\common\handler_helper.py", line 5, in <module>
    from onnx_tf.handlers.backend import *  # noqa
  File "C:\Python36\lib\site-packages\onnx_tf\handlers\backend\average_pool.py", line 7, in <module>
from .pool_mixin import PoolMixin
  File "C:\Python36\lib\site-packages\onnx_tf\handlers\backend\pool_mixin.py", line 12, in <module>
from .dilated_pooling import DilatedPooling
  File "C:\Python36\lib\site-packages\onnx_tf\handlers\backend\dilated_pooling.py", line 6, in 
 <module>
from onnx_tf.common import pooling_helper
  File "C:\Python36\lib\site-packages\onnx_tf\common\pooling_helper.py", line 16, in <module>
pad_tf_ops = pad_ops(tf.maximum, tf.math.ceil, tf.math.floor,

AttributeError: module 'tensorflow' has no attribute 'math'     
dani
  • 29
  • 2

0 Answers0