MCPcopy Create free account
hub / github.com/OUCMachineLearning/OUCML / ImageData

Class ImageData

GAN/Self_attention_GAN_tensorflow/utils.py:10–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8from keras.datasets import cifar10, mnist
9
10class ImageData:
11
12 def __init__(self, load_size, channels):
13 self.load_size = load_size
14 self.channels = channels
15
16 def image_processing(self, filename):
17 x = tf.read_file(filename)
18 x_decode = tf.image.decode_jpeg(x, channels=self.channels)
19 img = tf.image.resize_images(x_decode, [self.load_size, self.load_size])
20 img = tf.cast(img, tf.float32) / 127.5 - 1
21
22 return img
23
24
25def load_mnist(size=64):

Callers 1

build_modelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected