Guest User

Untitled

a guest
Apr 27th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. def get_1dconvs_maxpool_freq_deep( x_in, kernel_size=2):
  2. p=0.0
  3. x = BatchNormalization()(x_in)
  4.  
  5.  
  6. x = Conv1D(64,kernel_size,padding='same')(x)
  7. x = batch_relu(x)
  8. x = Conv1D(64,kernel_size,padding='same')(x)
  9. x = batch_relu(x)
  10.  
  11.  
  12. x = Dropout(p/2)(x)
  13. x = MaxPooling1D(2)(x)
  14.  
  15.  
  16.  
  17. x = Conv1D(128,3,padding='same')(x)
  18. x = batch_relu(x)
  19. x = Conv1D(128,3,padding='same')(x)
  20. x = batch_relu(x)
  21.  
  22. x = Dropout(p/2)(x)
  23. x = MaxPooling1D(2)(x)
  24.  
  25.  
  26. x = Conv1D(128,3,padding='same')(x)
  27. x = batch_relu(x)
  28. x = Conv1D(128,3,padding='same')(x)
  29. x = batch_relu(x)
  30.  
  31. x = Dropout(p/2)(x)
  32. x = MaxPooling1D(2)(x)
  33.  
  34.  
  35. x = Conv1D(128,3,padding='same')(x)
  36. x = batch_relu(x)
  37. x = Conv1D(128,3,padding='same')(x)
  38. x = batch_relu(x)
  39.  
  40. x = Dropout(p/2)(x)
  41. x = AveragePooling1D(2)(x)
  42.  
  43.  
  44. x_max = GlobalMaxPooling1D()(x)
  45. return x_max
Add Comment
Please, Sign In to add comment