clean: remove dead code
This commit is contained in:
parent
b31e2632d0
commit
9efd76eed5
@ -212,45 +212,6 @@ def core_cnn_layers(img_in: Input, img_height: int, img_width: int, drop: float,
|
||||
return x
|
||||
|
||||
|
||||
def default_model(input_shape, drop):
|
||||
# First layer, input layer, Shape comes from camera.py resolution, RGB
|
||||
img_in = Input(shape=input_shape, name='img_in')
|
||||
kernel_size = 5
|
||||
|
||||
x = img_in
|
||||
# 24 features, 5 pixel x 5 pixel kernel (convolution, feauture) window, 2wx2h stride, relu activation
|
||||
x = Convolution2D(input_shape[1] / kernel_size, (kernel_size, kernel_size), strides=(2, 2), activation='relu')(x)
|
||||
x = Dropout(drop)(x)
|
||||
# 32 features, 5px5p kernel window, 2wx2h stride, relu activatiion
|
||||
x = Convolution2D(input_shape[0] / kernel_size, (kernel_size, kernel_size), strides=(2, 2), activation='relu')(x)
|
||||
x = Dropout(drop)(x)
|
||||
# 64 features, 5px5p kernel window, 2wx2h stride, relu
|
||||
x = Convolution2D(64, (kernel_size, kernel_size), strides=(2, 2), activation='relu')(x)
|
||||
x = Dropout(drop)(x)
|
||||
# 64 features, 3px3p kernel window, 2wx2h stride, relu
|
||||
x = Convolution2D(64, (3, 3), strides=(2, 2), activation='relu')(x)
|
||||
x = Dropout(drop)(x)
|
||||
# 64 features, 3px3p kernel window, 1wx1h stride, relu
|
||||
x = Convolution2D(64, (3, 3), strides=(1, 1), activation='relu')(x)
|
||||
x = Dropout(drop)(x)
|
||||
|
||||
# Possibly add MaxPooling (will make it less sensitive to position in image).
|
||||
# Camera angle fixed, so may not to be needed
|
||||
|
||||
x = Flatten(name='flattened')(x) # Flatten to 1D (Fully connected)
|
||||
x = Dense(100, activation='relu')(x) # Classify the data into 100 features, make all negatives 0
|
||||
x = Dropout(drop)(x)
|
||||
x = Dense(50, activation='relu')(x)
|
||||
x = Dropout(drop)(x)
|
||||
# Connect every input with every output and output 15 hidden units. Use Softmax to give percentage.
|
||||
# 15 categories and find best one based off percentage 0.0-1.0
|
||||
angle_out = Dense(15, activation='softmax', name='angle_out')(x)
|
||||
|
||||
model = Model(inputs=[img_in], outputs=[angle_out])
|
||||
|
||||
return model
|
||||
|
||||
|
||||
def default_linear(input_shape=(120, 160, 3), drop=0.2):
|
||||
img_in = Input(shape=input_shape, name='img_in')
|
||||
x = core_cnn_layers(img_in, img_width=input_shape[1], img_height=input_shape[0], drop=drop)
|
||||
|
Loading…
Reference in New Issue
Block a user