$ python keras2pb.py --input_model="yolov3.h5" --output_model="yolov3.pb" --is_tiny=False --num_class=80
/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: 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)])
/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: 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)])
/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: 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)])
/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: 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)])
/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:521: 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)])
/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/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_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
File "keras2pb.py", line 24, in <module>
from yolo3.model import yolo_head,yolo_body,tiny_yolo_body
File "/home/huzhihao/projects/keras-yolo3-convert2pb/yolo3/model.py", line 10, in <module>
from tensorflow.python.keras.layers.advanced_activations import LeakyReLU
File "/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/keras/layers/advanced_activations.py", line 26, in <module>
from tensorflow.python.keras.engine.base_layer import InputSpec
File "/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/keras/engine/__init__.py", line 23, in <module>
from tensorflow.python.keras.engine.base_layer import InputSpec
File "/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 69, in <module>
class Layer(checkpointable.CheckpointableBase):
File "/home/huzhihao/anaconda3/envs/keras-yolo3/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 473, in Layer
synchronization=vs.VariableSynchronization.AUTO,
AttributeError: module 'tensorflow.python.ops.variable_scope' has no attribute 'VariableSynchronization'
Which verson of tf and keras you use?