Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--THNN.lua11
1 files changed, 2 insertions, 9 deletions
diff --git a/THNN.lua b/THNN.lua
index 60430f0..0848e9e 100644
--- a/THNN.lua
+++ b/THNN.lua
@@ -55,7 +55,7 @@ local replacements =
{
{
['TYPE'] = 'Double',
- ['real'] = 'double',
+ ['accreal'] = 'double',
['THTensor'] = 'THDoubleTensor',
['THIndexTensor'] = 'THLongTensor',
['THIntegerTensor'] = 'THIntTensor',
@@ -64,7 +64,7 @@ local replacements =
},
{
['TYPE'] = 'Float',
- ['real'] = 'float',
+ ['accreal'] = 'double',
['THTensor'] = 'THFloatTensor',
['THIndexTensor'] = 'THLongTensor',
['THIntegerTensor'] = 'THIntTensor',
@@ -73,13 +73,6 @@ local replacements =
}
}
--- gsub(s, 'real', 'float') changes accreal to accfloat.
--- typedef accfloat ahead of time.
-ffi.cdef("typedef double accfloat;")
--- gsub(s, 'real', 'double') changes accreal to accfloat.
--- typedef accdouble ahead of time
-ffi.cdef("typedef double accdouble;")
-
for i=1,#replacements do
local r = replacements[i]
local s = preprocessed