[1] [Handwritten Chinese Font Generation with Collaborative Stroke Refinement]之数据增长实现
版权归属:
更多关注:
1.原理
《Handwritten Chinese Font Generation with Collaborative Stroke Refinement》arxiv.org/abs/1904.13268
文中网络架构图如下:

图中的online zoom-augmentation是实现网络训练时,对输入数据进行水平和垂直方向上的transform

2.编码实现
def hv_transform(self, image):
'''
'''
orig_shp = image.shape
image = tf.cast(image, tf.float32)
rd = tf.random.uniform([])
less_than_025 = tf.less(rd, tf.constant(0.25))
less_than_050 = tf.less(rd, tf.constant(0.50))
less_than_075 = tf.less

本文介绍了《Handwritten Chinese Font Generation with Collaborative Stroke Refinement》的研究,阐述了其原理,并提供了基于TensorFlow 1.13.1的编码实现,重点在于数据增长过程中如何利用random实现随机参数,并通过tf.reshape()确保数据形状正确。
最低0.47元/天 解锁文章
861

被折叠的 条评论
为什么被折叠?



