Skip to content

Commit

Permalink
now using gradient clipping
Browse files Browse the repository at this point in the history
  • Loading branch information
davidBelanger committed Jan 6, 2017
1 parent d4fc3cf commit 03b4f5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions train/Train.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function Train:__init(loss_wrapper, batcher, optimization_config, general_config

self.model = optimization_config.modules_to_update

self.gradient_clip = optimization_config.gradient_clip
self.clamp_gradient = self.gradient_clip > 0
self.parameters, self.grad_parameters = self.model:getParameters()
self.data_for_callbacks = {
parameters = self.parameters,
Expand Down

0 comments on commit 03b4f5e

Please sign in to comment.