Skip to content

Instantly share code, notes, and snippets.

@olix20
Created April 19, 2018 15:22
Show Gist options
  • Select an option

  • Save olix20/0b721841046ded3dd0abaf468f983875 to your computer and use it in GitHub Desktop.

Select an option

Save olix20/0b721841046ded3dd0abaf468f983875 to your computer and use it in GitHub Desktop.
sample vgg like 1dconvs on freque
def get_1dconvs_maxpool_freq_deep( x_in, kernel_size=2):
p=0.0
x = BatchNormalization()(x_in)
x = Conv1D(64,kernel_size,padding='same')(x)
x = batch_relu(x)
x = Conv1D(64,kernel_size,padding='same')(x)
x = batch_relu(x)
x = Dropout(p/2)(x)
x = MaxPooling1D(2)(x)
x = Conv1D(128,3,padding='same')(x)
x = batch_relu(x)
x = Conv1D(128,3,padding='same')(x)
x = batch_relu(x)
x = Dropout(p/2)(x)
x = MaxPooling1D(2)(x)
x = Conv1D(128,3,padding='same')(x)
x = batch_relu(x)
x = Conv1D(128,3,padding='same')(x)
x = batch_relu(x)
x = Dropout(p/2)(x)
x = MaxPooling1D(2)(x)
x = Conv1D(128,3,padding='same')(x)
x = batch_relu(x)
x = Conv1D(128,3,padding='same')(x)
x = batch_relu(x)
x = Dropout(p/2)(x)
x = AveragePooling1D(2)(x)
x_max = GlobalMaxPooling1D()(x)
return x_max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment