-
Notifications
You must be signed in to change notification settings - Fork 14
/
init.lua
48 lines (32 loc) · 868 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
-- check we are installed from distro, otherwise error message and exit...
require 'os'
xpcall(function()
require 'distrocheck'
end, function()
print('Please install cltorch from distro, per instructions at https://github.com/hughperkins/cltorch')
os.exit(1)
end)
require 'cltorch'
require "torch"
require 'nn'
require('clnn.THCLNN')
clnn = paths.require("libclnn")
function nn.Module:cl()
return self:type('torch.ClTensor')
end
function nn.Criterion:cl()
return self:type('torch.ClTensor')
end
torch.ClTensor.nn = {}
include 'TemporalConvolution2.lua'
include 'LookupTable.lua'
include 'Pointwise.lua'
include 'Threshold.lua'
include 'LogSoftMax.lua'
include 'Narrow.lua'
include 'MSECriterion.lua'
include 'ClassNLLCriterion.lua'
include 'StatefulTimer.lua'
include 'CMulTable.lua'
include 'test.lua'
include 'SpatialUpSamplingNearest.lua'