91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 47.31MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-24
  • 語言: 其他
  • 標簽: 深度學習??GAN??

資源簡介

包含,CycleGAN的代碼,文檔以及論文,講解詳細,有需要者不可放過。

資源截圖

代碼片段和文件信息

from?__future__?import?absolute_import?division?print_function

import?tensorflow?as?tf


def?image_batch(image_paths?batch_size?load_size=286?crop_size=256?channels=3?shuffle=True
????????????????num_threads=4?min_after_dequeue=100?allow_smaller_final_batch=False):
????“““?for?jpg?and?png?files?“““
????#?queue?and?reader
????img_queue?=?tf.train.string_input_producer(image_paths?shuffle=shuffle)
????reader?=?tf.WholeFileReader()

????#?preprocessing
????_?img?=?reader.read(img_queue)
????img?=?tf.image.decode_image(img?channels=3)
????‘‘‘
????tf.image.random_flip_left_right?should?be?used?before?tf.image.resize_images
????because?tf.image.decode_image?reutrns?a?tensor?without?shape?which?makes
????tf.image.resize_images?collapse.?Maybe?it‘s?a?bug!
????‘‘‘
????img?=?tf.image.random_flip_left_right(img)
????img?=?tf.image.resize_images(img?[load_size?load_size])
????img?=?tf.random_crop(img?[crop_size?crop_size?channels])
????img?=?tf.cast(img?tf.float32)?/?127.5?-?1

????#?batch
????if?shuffle:
????????capacity?=?min_after_dequeue?+?(num_threads?+?1)?*?batch_size
????????img_batch?=?tf.train.shuffle_batch([img]
???????????????????????????????????????????batch_size=batch_size
???????????????????????????????????????????capacity=capacity
???????????????????????????????????????????min_after_dequeue=min_after_dequeue
???????????????????????????????????????????num_threads=num_threads
???????????????????????????????????????????allow_smaller_final_batch=allow_smaller_final_batch)
????else:
????????img_batch?=?tf.train.batch([img]
???????????????????????????????????batch_size=batch_size
???????????????????????????????????allow_smaller_final_batch=allow_smaller_final_batch)
????return?img_batch?len(image_paths)


class?ImageData:

????def?__init__(self?session?image_paths?batch_size?load_size=286?crop_size=256?channels=3?shuffle=True
?????????????????num_threads=4?min_after_dequeue=100?allow_smaller_final_batch=False):
????????self.sess?=?session
????????self.img_batch?self.img_num?=?image_batch(image_paths?batch_size?load_size?crop_size?channels?shuffle
???????????????????????????????????????????????????num_threads?min_after_dequeue?allow_smaller_final_batch)

????def?__len__(self):
????????return?self.img_num

????def?batch_ops(self):
????????return?self.img_batch

????def?batch(self):
????????return?self.sess.run(self.img_batch)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-09-10?10:28??CycleGAN-風格遷移\
?????目錄???????????0??2018-09-08?20:49??CycleGAN-風格遷移\PPT及PDF\
?????文件????47225034??2018-09-08?20:49??CycleGAN-風格遷移\PPT及PDF\CycleGAN復現指南.pdf
?????文件?????8495657??2018-09-08?20:40??CycleGAN-風格遷移\PPT及PDF\CycleGAN復現指南.pptx
?????文件?????2737562??2018-09-08?20:38??CycleGAN-風格遷移\Unpaired?Image-to-Image?Translation?using?Cycle-Consistent?Adversarial?Networks.pdf
?????目錄???????????0??2018-09-10?10:29??CycleGAN-風格遷移\源碼及數據\
?????文件????????2411??2018-09-08?20:49??CycleGAN-風格遷移\源碼及數據\data.py
?????文件????????6287??2018-09-08?20:49??CycleGAN-風格遷移\源碼及數據\image_utils.py
?????文件????????3090??2018-09-08?20:49??CycleGAN-風格遷移\源碼及數據\models.py
?????文件????????2844??2018-09-08?20:49??CycleGAN-風格遷移\源碼及數據\ops.py
?????文件????????2496??2018-09-08?20:49??CycleGAN-風格遷移\源碼及數據\test.py
?????文件????????7606??2018-09-08?20:49??CycleGAN-風格遷移\源碼及數據\train.py
?????文件????????1760??2018-09-08?20:50??CycleGAN-風格遷移\源碼及數據\utils.py

評論

共有 條評論