def _create_model(self,input_data,reuse=False):
with self.graph.as_default():
with tf.variable_scope("hp_model"):
model = input_data
# Programatically define Layers
for i in range(self.LAYER_COUNT):
layer = slim.fully_connected(model,self.NEURON_SIZE,activation_fn=tf.nn.relu,scope="hp_model_"+str(i),
reuse=reuse,weights_initializer=self.initializer)
model = layer
layer = slim.fully_connected(model,1,scope="output",\
reuse=reuse,weights_initializer=self.initializer)
#'''
model = layer
layer = tf.nn.batch_normalization(model,tf.constant(0.0,shape=[1]),\
tf.constant(1.0,shape=[1]),None,None,1e-5)
#'''
return layer
humancritic_tensorflow.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录