Skip to content

Commit 6f80889

Browse files
committed
Switched to CUNN test
test polished
1 parent 2180bde commit 6f80889

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

demos/android-demo/assets/main.lua

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require 'torch'
66
require 'cutorch'
77
require 'cunn'
8+
-- require 'cudnn'
89
require 'nnx'
910
require 'dok'
1011
require 'image'
@@ -17,15 +18,21 @@ end
1718

1819
print("Hello from Lua")
1920

20-
---
21-
print("Running cutorch.test()")
22-
cutorch.test()
21+
-- CuTorch test needs augmentation due to reduced type set.
22+
-- print("Running cutorch.test()")
23+
-- cutorch.test()
2324

2425

2526
print("Running cunn.test()")
26-
cunn.test()
27+
cunn.test('GPU')
28+
print("After cunn.test(GPU)")
2729

28-
-- nn.testcuda{'pointwise_forward'}
30+
-- nn.testcuda{'VolumetricConvolution_forward_batch'}
31+
-- cunn.test()
32+
--print("Running cudnn.test()")
33+
--cudnn.test()
34+
35+
cunn.test('SpatialConvolutionLocal_forward_single')
2936

3037
--- print('Running VolumetricConvolution_forward_batch:')
3138
--- nn.testcuda{'VolumetricConvolution_forward_batch'}

demos/android-demo/src/com/torch/Torch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected String doInBackground(String... lua) {
3636
int count = lua.length;
3737
String response = "";
3838
for (int i = 0; i < count; i++) {
39-
Log.d("doInBackground(%s)\n", lua[i]);
39+
Log.d("Torch", String.format("doInBackground(%s)\n", lua[i]));
4040
response += evalAssetFile(lua[i]);
4141
}
4242
return response;
@@ -46,7 +46,7 @@ protected String doInBackground(String... lua) {
4646

4747
// Todo: extract native method to evaluate Lua String
4848
private String evalAssetFile(String lua) {
49-
Log.d("Torch.evalAssetFile(%s)\n", lua);
49+
Log.d("Torch", String.format("Torch.evalAssetFile(%s)\n", lua));
5050
return jni_call(assetManager, info.nativeLibraryDir, lua);
5151
}
5252

demos/android-demo/src/com/torch/torchdemo/TorchDemo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public TorchTask()
3030
}
3131

3232
protected void onPostExecute(String result) {
33-
Log.d("onPostExecute, Torch returned: %s)\n", result);
33+
Log.d("torchdemo", String.format("onPostExecute, Torch returned: %s", result));
3434
tv.setText(result);
3535
// setContentView(tv);
3636
}

0 commit comments

Comments
 (0)