-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.c
55 lines (38 loc) · 1.28 KB
/
init.c
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
48
49
50
51
52
53
#include "TH.h"
#include "luaT.h"
#define torch_(NAME) TH_CONCAT_3(torch_, Real, NAME)
#define torch_Tensor TH_CONCAT_STRING_3(torch.,Real,Tensor)
#define nn_(NAME) TH_CONCAT_3(nn_, Real, NAME)
#define kex_(NAME) TH_CONCAT_3(kex_, Real, NAME)
#define torch_string_(NAME) TH_CONCAT_STRING_3(torch., Real, NAME)
#include "generic/SpatialFullConvolution.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialFullConvolutionMap.c"
#include "THGenerateFloatTypes.h"
#include "generic/L1Cost.c"
#include "THGenerateFloatTypes.h"
#include "generic/SpatialMaxPooling2.c"
#include "THGenerateFloatTypes.h"
#include "generic/util.c"
#include "THGenerateFloatTypes.h"
#include "generic/SqrtBias.c"
#include "THGenerateFloatTypes.h"
DLL_EXPORT int luaopen_libkex(lua_State *L)
{
lua_newtable(L);
lua_pushvalue(L, -1);
lua_setfield(L, LUA_GLOBALSINDEX, "kex");
kex_Floatutil_init(L);
kex_Doubleutil_init(L);
nn_FloatSpatialFullConvolution_init(L);
nn_DoubleSpatialFullConvolution_init(L);
nn_FloatSpatialFullConvolutionMap_init(L);
nn_DoubleSpatialFullConvolutionMap_init(L);
nn_FloatL1Cost_init(L);
nn_DoubleL1Cost_init(L);
nn_FloatSpatialMaxPooling2_init(L);
nn_DoubleSpatialMaxPooling2_init(L);
nn_FloatSqrtBias_init(L);
nn_DoubleSqrtBias_init(L);
return 1;
}