mynn.lua 367 B

1234567891011121314151617181920
  1. local function load_cunn()
  2. require 'nn'
  3. require 'cunn'
  4. end
  5. local function load_cudnn()
  6. require 'cudnn'
  7. cudnn.fastest = true
  8. end
  9. if mynn then
  10. return mynn
  11. else
  12. load_cunn()
  13. --load_cudnn()
  14. mynn = {}
  15. require './LeakyReLU'
  16. require './LeakyReLU_deprecated'
  17. require './DepthExpand2x'
  18. require './RGBWeightedMSECriterion'
  19. return mynn
  20. end