You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MSECriterion.lua 411B

12345678910111213
  1. local dt = require "decisiontree._env"
  2. function nn.MSECriterion.updateHessianInput(self, input, target)
  3. self.hessInput = self.hessInput or input.new()
  4. self.hessInput:resize(input:size()):fill(2)
  5. return self.hessInput
  6. end
  7. -- returns gradInput and hessInput
  8. function nn.MSECriterion.backward2(self, input, target)
  9. return self:updateGradInput(input, target), self:updateHessInput(input, target)
  10. end