hunglc007 / tensorflow-yolov4-tflite

YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
https://github.com/hunglc007/tensorflow-yolov4-tflite
MIT License
2.23k stars 1.24k forks source link

tensorflow depthwise convolution weight set weight problem #422

Open KuoEuran opened 2 years ago

KuoEuran commented 2 years ago

Hi, I have trained yolov4-tiny with depthwise convolutional layer and got a weight file. My darknet depthwise cfg is like image , and I use Netron to look my cfg file like image I changed my normal convolution in backbone.py, and I used tf.keras.layers.SeparableConv2D in common.py. image However, I got a bad result about the set_weights in utils.py, it showed get_weights (3, 3, 2048, 1) in tf.keras.layers.SeparableConv2D. I need (3, 3, 8, 256) in netron cfg. image

Does anyone solve the issue like this? Please give me some advice, thanks.