AdaConv-Tensorflow
AdaConv-Tensorflow copied to clipboard
Simple Tensorflow implementation of "Adaptive Convolutions for Structure-Aware Style Transfer" (CVPR 2021)
AdaConv — Simple TensorFlow Implementation [Paper]
: Adaptive Convolutions for Structure-Aware Style Transfer (CVPR 2021)
Note
This repository does not implement all codes, but only implements the core modules of the paper.
Requirements
Tensorflow == 2.5.0
Usage
feats = tf.random.normal(shape=[5, 64, 64, 256])
style_w = tf.random.normal(shape=[5, 512])
kp = KernelPredict(in_channels=feats.shape[-1], group_div=1)
adac = AdaConv(channels=1024, group_div=1)
w_spatial, w_pointwise, bias = kp(style_w)
x = adac([feats, w_spatial, w_pointwise, bias]) # [5, 64, 64, 1024]
Reference
- https://github.com/RElbers/ada-conv-pytorch