model.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:behavioral-cloning 作者: BillZito 项目源码 文件源码
def comma_model():
  row, col, depth = 66, 200, 3
  shape = (row, col, depth)

  model = Sequential()

  model.add(Lambda(lambda x: x/127.5 -1., input_shape=shape, output_shape=shape))
  model.add(Convolution2D(16, 8, 8, subsample=(4, 4), border_mode='same'))
  model.add(ELU())
  model.add(Convolution2D(32, 5, 5, subsample=(2, 2), border_mode='same'))
  model.add(ELU())
  model.add(Convolution2D(64, 5, 5, subsample=(2, 2), border_mode='same'))

  model.add(Flatten())
  model.add(Dropout(.2))
  model.add(ELU())
  model.add(Dense(512))
  model.add(Dropout(.5))
  model.add(ELU())

  #the fully connected layer accounts for huge % of parameters (50+)
  model.add(Dense(1))

  model.compile(loss='mse', optimizer='adam')
  model.summary()
  return model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号