[1] [Handwritten Chinese Font Generation with Collaborative Stroke Refinement]之数据增长实现

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[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
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值