Python tflearn.layers.core.dropout() Examples
The following are 30
code examples of tflearn.layers.core.dropout().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
tflearn.layers.core
, or try the search function
.
Example #1
Source File: em_model.py From Emotion-recognition-and-prediction with Apache License 2.0 | 6 votes |
def build_network(self): print("---> Starting Neural Network") self.network = input_data(shape = [None, 48, 48, 1]) self.network = conv_2d(self.network, 64, 5, activation = 'relu') self.network = max_pool_2d(self.network, 3, strides = 2) self.network = conv_2d(self.network, 64, 5, activation = 'relu') self.network = max_pool_2d(self.network, 3, strides = 2) self.network = conv_2d(self.network, 128, 4, activation = 'relu') self.network = dropout(self.network, 0.3) self.network = fully_connected(self.network, 3072, activation = 'relu') self.network = fully_connected(self.network, len(self.target_classes), activation = 'softmax') self.network = regression(self.network, optimizer = 'momentum', loss = 'categorical_crossentropy') self.model = tflearn.DNN( self.network, checkpoint_path = 'model_1_nimish', max_checkpoints = 1, tensorboard_verbose = 2 ) self.load_model()
Example #2
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet2(width, height, lr, output=3): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #3
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_frames(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height,frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #4
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height, frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #5
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_v0(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height, frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, 3, activation='relu') network = conv_3d(network, 384, 3, 3, activation='relu') network = conv_3d(network, 256, 3, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #6
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet(width, height, lr, output=3): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #7
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_color_2d(width, height, frame_count, lr, output=9, model_name = 'sentnet_color.model'): network = input_data(shape=[None, width, height, 3], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, max_checkpoints=0, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #8
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_color(width, height, frame_count, lr, output=9, model_name = 'sentnet_color.model'): network = input_data(shape=[None, width, height,3, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path=model_name, max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #9
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_frames(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height,frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #10
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height, frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #11
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet2(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height, frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 3, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #12
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_v0(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height, frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, 3, activation='relu') network = conv_3d(network, 384, 3, 3, activation='relu') network = conv_3d(network, 256, 3, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #13
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet(width, height, lr, output=3): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #14
Source File: alexnet.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet(width, height, lr): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 3, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #15
Source File: weights_loading_scope.py From FRU with MIT License | 5 votes |
def make_core_network(network): network = tflearn.reshape(network, [-1, 28, 28, 1], name="reshape") network = conv_2d(network, 32, 3, activation='relu', regularizer="L2") network = max_pool_2d(network, 2) network = local_response_normalization(network) network = conv_2d(network, 64, 3, activation='relu', regularizer="L2") network = max_pool_2d(network, 2) network = local_response_normalization(network) network = fully_connected(network, 128, activation='tanh') network = dropout(network, 0.8) network = fully_connected(network, 256, activation='tanh') network = dropout(network, 0.8) network = fully_connected(network, 10, activation='softmax') return network
Example #16
Source File: weights_loading_scope.py From FRU with MIT License | 5 votes |
def make_core_network(network): dense1 = tflearn.fully_connected(network, 64, activation='tanh', regularizer='L2', weight_decay=0.001, name="dense1") dropout1 = tflearn.dropout(dense1, 0.8) dense2 = tflearn.fully_connected(dropout1, 64, activation='tanh', regularizer='L2', weight_decay=0.001, name="dense2") dropout2 = tflearn.dropout(dense2, 0.8) softmax = tflearn.fully_connected(dropout2, 10, activation='softmax', name="softmax") return softmax
Example #17
Source File: test_validation_monitors.py From FRU with MIT License | 5 votes |
def test_vbs1(self): with tf.Graph().as_default(): # Data loading and preprocessing import tflearn.datasets.mnist as mnist X, Y, testX, testY = mnist.load_data(one_hot=True) X = X.reshape([-1, 28, 28, 1]) testX = testX.reshape([-1, 28, 28, 1]) X = X[:20, :, :, :] Y = Y[:20, :] testX = testX[:10, :, :, :] testY = testY[:10, :] # Building convolutional network network = input_data(shape=[None, 28, 28, 1], name='input') network = conv_2d(network, 32, 3, activation='relu', regularizer="L2") network = max_pool_2d(network, 2) network = local_response_normalization(network) network = conv_2d(network, 64, 3, activation='relu', regularizer="L2") network = max_pool_2d(network, 2) network = local_response_normalization(network) network = fully_connected(network, 128, activation='tanh') network = dropout(network, 0.8) network = fully_connected(network, 256, activation='tanh') network = dropout(network, 0.8) network = fully_connected(network, 10, activation='softmax') network = regression(network, optimizer='adam', learning_rate=0.01, loss='categorical_crossentropy', name='target') # Training model = tflearn.DNN(network, tensorboard_verbose=3) model.fit({'input': X}, {'target': Y}, n_epoch=1, batch_size=10, validation_set=({'input': testX}, {'target': testY}), validation_batch_size=5, snapshot_step=10, show_metric=True, run_id='convnet_mnist_vbs') self.assertEqual(model.train_ops[0].validation_batch_size, 5) self.assertEqual(model.train_ops[0].batch_size, 10)
Example #18
Source File: emotion_recognition.py From emotion-recognition-neural-networks with MIT License | 5 votes |
def build_network(self): # Smaller 'AlexNet' # https://github.com/tflearn/tflearn/blob/master/examples/images/alexnet.py print('[+] Building CNN') self.network = input_data(shape=[None, SIZE_FACE, SIZE_FACE, 1]) self.network = conv_2d(self.network, 64, 5, activation='relu') #self.network = local_response_normalization(self.network) self.network = max_pool_2d(self.network, 3, strides=2) self.network = conv_2d(self.network, 64, 5, activation='relu') self.network = max_pool_2d(self.network, 3, strides=2) self.network = conv_2d(self.network, 128, 4, activation='relu') self.network = dropout(self.network, 0.3) self.network = fully_connected(self.network, 3072, activation='relu') self.network = fully_connected( self.network, len(EMOTIONS), activation='softmax') self.network = regression( self.network, optimizer='momentum', loss='categorical_crossentropy' ) self.model = tflearn.DNN( self.network, checkpoint_path=SAVE_DIRECTORY + '/emotion_recognition', max_checkpoints=1, tensorboard_verbose=2 ) self.load_model()
Example #19
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_v0(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height, frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, 3, activation='relu') network = conv_3d(network, 384, 3, 3, activation='relu') network = conv_3d(network, 256, 3, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #20
Source File: alexnet.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet(width, height, lr, output=3): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=2, tensorboard_dir='log') return model
Example #21
Source File: alexnet.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet2(width, height, lr, output=3): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=2, tensorboard_dir='log') return model
Example #22
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_color_2d(width, height, frame_count, lr, output=9, model_name = 'sentnet_color.model'): network = input_data(shape=[None, width, height, 3], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, max_checkpoints=0, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #23
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_color(width, height, frame_count, lr, output=9, model_name = 'sentnet_color.model'): network = input_data(shape=[None, width, height,3, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path=model_name, max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #24
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_frames(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height,frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #25
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height, frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = avg_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #26
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet2(width, height, lr, output=3): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #27
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_color(width, height, frame_count, lr, output=9, model_name = 'sentnet_color.model'): network = input_data(shape=[None, width, height,3, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path=model_name, max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #28
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def alexnet(width, height, lr, output=3): network = input_data(shape=[None, width, height, 1], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #29
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_color_2d(width, height, frame_count, lr, output=9, model_name = 'sentnet_color.model'): network = input_data(shape=[None, width, height, 3], name='input') network = conv_2d(network, 96, 11, strides=4, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = conv_2d(network, 256, 5, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 384, 3, activation='relu') network = conv_2d(network, 256, 3, activation='relu') network = max_pool_2d(network, 3, strides=2) network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, max_checkpoints=0, tensorboard_verbose=0, tensorboard_dir='log') return model
Example #30
Source File: models.py From pygta5 with GNU General Public License v3.0 | 5 votes |
def sentnet_frames(width, height, frame_count, lr, output=9): network = input_data(shape=[None, width, height,frame_count, 1], name='input') network = conv_3d(network, 96, 11, strides=4, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) network = conv_3d(network, 256, 5, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 384, 3, activation='relu') network = conv_3d(network, 256, 3, activation='relu') network = max_pool_3d(network, 3, strides=2) #network = local_response_normalization(network) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, 4096, activation='tanh') network = dropout(network, 0.5) network = fully_connected(network, output, activation='softmax') network = regression(network, optimizer='momentum', loss='categorical_crossentropy', learning_rate=lr, name='targets') model = tflearn.DNN(network, checkpoint_path='model_alexnet', max_checkpoints=1, tensorboard_verbose=0, tensorboard_dir='log') return model