Skip to content

Commit

Permalink
spatialmaxpooling fix
Browse files Browse the repository at this point in the history
Former-commit-id: e639d5f
  • Loading branch information
yoonkim committed Aug 21, 2015
1 parent 6e4f822 commit e2cff8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/TDNN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function TDNN.tdnn(length, input_size, feature_maps, kernels)
conv.name = 'conv_filter_' .. kernels[i] .. '_' .. feature_maps[i]
local conv_layer = conv(nn.View(1, -1, input_size):setNumInputDims(2)(input))
--pool_layer = nn.Max(3)(nn.Max(3)(nn.Tanh()(conv_layer)))
pool_layer = nn.Squeeze()(cudnn.SpatialMaxPooling(1, reduced_l, 1, 1, 0,0)(conv_layer))
pool_layer = nn.Squeeze()(cudnn.SpatialMaxPooling(1, reduced_l, 1, 1, 0, 0)(nn.Tanh()(conv_layer)))
else
-- Temporal conv. much slower
local conv = nn.TemporalConvolution(input_size, feature_maps[i], kernels[i])
Expand Down

0 comments on commit e2cff8e

Please sign in to comment.