/RepVGG-Tensorflow-2

Primary LanguagePythonMIT LicenseMIT

RepVGG: Making VGG-style ConvNets Great Again (Tensorflow 2)

TODO: Usage

TODO: Convert the training-time models into inference-time

TODO: ImageNet training

FAQs

Q: Is the inference-time model's output the same as the training-time model?

A: Yes. You can verify that by

import tensorflow as tf
import numpy as np
train_model = create_RepVGG_A0(deploy=False)
train_model.build(input_shape=(None, 64, 64, 3))
deploy_model = repvgg_model_convert(train_model, create_RepVGG_A0, image_size=(64, 64, 3))
x = tf.random.uniform((32, 64, 64, 3))
train_y = train_model(x)
deploy_y = deploy_model(x)
print(np.mean((train_y - deploy_y) ** 2))    # Will be around 1e-10

Related works

Reference

Author

HOANG Duc Thang