def __init__(self, config,
debug_information=False,
is_train=True):
self.debug = debug_information
self.config = config
self.batch_size = self.config.batch_size
self.input_height = self.config.data_info[0]
self.input_width = self.config.data_info[1]
self.num_class = self.config.data_info[2]
self.c_dim = self.config.data_info[3]
self.visualize_shape = self.config.visualize_shape
self.conv_info = self.config.conv_info
self.activation_fn = {
'selu': selu,
'relu': tf.nn.relu,
'lrelu': lrelu,
}[self.config.activation]
# create placeholders for the input
self.image = tf.placeholder(
name='image', dtype=tf.float32,
shape=[self.batch_size, self.input_height, self.input_width, self.c_dim],
)
self.label = tf.placeholder(
name='label', dtype=tf.float32, shape=[self.batch_size, self.num_class],
)
self.is_training = tf.placeholder_with_default(bool(is_train), [], name='is_training')
self.build(is_train=is_train)
model.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录