日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

CV之IG:基于CNN网络架构+ResNet网络进行DIY图像生成网络

發(fā)布時(shí)間:2025/3/21 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CV之IG:基于CNN网络架构+ResNet网络进行DIY图像生成网络 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

CV之IG:基于CNN網(wǎng)絡(luò)架構(gòu)+ResNet網(wǎng)絡(luò)進(jìn)行DIY圖像生成網(wǎng)絡(luò)

?

?

目錄

設(shè)計(jì)思路

實(shí)現(xiàn)代碼


?

?

?

設(shè)計(jì)思路

?

實(shí)現(xiàn)代碼

# 定義圖像生成網(wǎng)絡(luò):image, training,兩個(gè)參數(shù)# Less border effects when padding a little before passing through ..image = tf.pad(image, [[0, 0], [10, 10], [10, 10], [0, 0]], mode='REFLECT')with tf.variable_scope('conv1'):conv1 = relu(instance_norm(conv2d(image, 3, 32, 9, 1)))with tf.variable_scope('conv2'):conv2 = relu(instance_norm(conv2d(conv1, 32, 64, 3, 2)))with tf.variable_scope('conv3'):conv3 = relu(instance_norm(conv2d(conv2, 64, 128, 3, 2)))with tf.variable_scope('res1'):res1 = residual(conv3, 128, 3, 1)with tf.variable_scope('res2'):res2 = residual(res1, 128, 3, 1)with tf.variable_scope('res3'):res3 = residual(res2, 128, 3, 1)with tf.variable_scope('res4'):res4 = residual(res3, 128, 3, 1)with tf.variable_scope('res5'):res5 = residual(res4, 128, 3, 1)# print(res5.get_shape())with tf.variable_scope('deconv1'):# deconv1 = relu(instance_norm(conv2d_transpose(res5, 128, 64, 3, 2)))deconv1 = relu(instance_norm(resize_conv2d(res5, 128, 64, 3, 2, training)))with tf.variable_scope('deconv2'):# deconv2 = relu(instance_norm(conv2d_transpose(deconv1, 64, 32, 3, 2)))deconv2 = relu(instance_norm(resize_conv2d(deconv1, 64, 32, 3, 2, training)))with tf.variable_scope('deconv3'):# deconv_test = relu(instance_norm(conv2d(deconv2, 32, 32, 2, 1)))deconv3 = tf.nn.tanh(instance_norm(conv2d(deconv2, 32, 3, 9, 1)))y = (deconv3 + 1) * 127.5height = tf.shape(y)[1]width = tf.shape(y)[2]y = tf.slice(y, [0, 10, 10, 0], tf.stack([-1, height - 20, width - 20, -1]))return y

?

總結(jié)

以上是生活随笔為你收集整理的CV之IG:基于CNN网络架构+ResNet网络进行DIY图像生成网络的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。