def build_FD_model(img_input):
	with tf.variable_scope('FD_detection'):
		mod = M.Model(img_input,[None,28*28])
		mod.reshape([-1,28,28,1])
		mod.convLayer(5,16,activation=M.PARAM_LRELU)
		mod.maxpoolLayer(2)
		mod.convLayer(5,16,activation=M.PARAM_LRELU)
		mod.maxpoolLayer(2)
		mod.convLayer(5,16,activation=M.PARAM_LRELU)
		mod.maxpoolLayer(2)
		mod.flatten()
		mod.fcLayer(50,activation=M.PARAM_LRELU)
		mod.fcLayer(11)
	return mod.get_current_layer()
def build_model(img_input):
	# can change whatever activation function
	with tf.variable_scope('mnist'):
		mod = M.Model(img_input,[None,28*28])
		mod.reshape([-1,28,28,1])
		mod.convLayer(5,16,activation=M.PARAM_LRELU)
		mod.maxpoolLayer(2)
		mod.convLayer(5,16,activation=M.PARAM_LRELU)
		mod.maxpoolLayer(2)
		mod.convLayer(5,16,activation=M.PARAM_LRELU)
		mod.maxpoolLayer(2)
		mod.flatten()
		mod.fcLayer(50,activation=M.PARAM_LRELU)
		mod.fcLayer(10)
	return mod.get_current_layer()
Exemple #3
0
 def __init__(self):
     self.model = model.Model(test_config)
     # 将影像采样为小图片,并进行保存,这个集合记录小图片的地址
     self.sample_image_path = []
     self.size = test_config.size