import tensorflow as tf

			self.n_data = n_data

	def data_map(self, img_path):
		n_bits = config.model.data.n_bits
		n_bins = 2**n_bits
		rgb = tf.image.decode_png(tf.read_file(img_path), channels=3, dtype=tf.uint8)

		h = config.model.data.dimensions.h
		w = config.model.data.dimensions.w
		c = config.model.data.dimensions.c
		# rgb.set_shape([h,w,c]) # variable size per example

		# crop for lsun 96
		rgb = tf.image.random_crop(rgb,size=[h,w,c])

		# crop for patch training
		crop_h = h//self.crop_factor
		crop_w = w//self.crop_factor
		rgb = tf.image.random_crop(rgb,size=[crop_h,crop_w,c])

		# cast, bit conversion, compress domain, center
		rgb = tf.cast(rgb, tf.float32)
		if n_bits < 8:
			rgb = tf.floor(rgb/(2**(8-n_bits)))
		rgb = rgb/(n_bins) - 0.5

