Demo entry 6763600

1

   

Submitted by anonymous on Oct 23, 2018 at 17:34
Language: Python 3. Code size: 755 Bytes.

vggModel = VGG_16()

x = GlobalAveragePooling2D()(vggModel.output)
x = Dense(1024, activation='relu')(x)
x = Dropout(0.2)(x)
x = Dense(256, activation='relu')(x)
x = Dropout(0.2)(x)
predictions = Dense(2, activation='softmax')(x)
DeepLearning = Model(inputs=vggModel.input, outputs=predictions)

DeepLearning.compile(optimizer=SGD(lr=LearningRate,decay=Decay,
	momentum=0.9,nesterov=True),loss='categorical_crossentropy',metrics=['acc'])


DATAGEN = ImageDataGenerator(
	rescale=1./255,
	rotation_range=20,
	width_shift_range=0.2,
	height_shift_range=0.2,
	shear_range=0.2,
	zoom_range=0.2, 
	horizontal_flip=True,
	vertical_flip=True,
	featurewise_center=True,
	featurewise_std_normalization=True,
	data_format="channels_last")

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).