Skip to content

Instantly share code, notes, and snippets.

View montyhall's full-sized avatar

peyman faratin montyhall

  • RobustLinks
  • New York
View GitHub Profile
require 'nn'
require 'cunn'
require 'image'
require 'nnx'
require 'nngraph'
require 'Upsample'
require 'util.misc'
model_utils = require 'util.model_utils'
print('loading image')
luarocks install torchx
Installing https://raw.githubusercontent.com/torch/rocks/master/torchx-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/torchx-scm-1.rockspec... switching to 'build' mode
Cloning into 'torchx'...
remote: Counting objects: 23, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 23 (delta 0), reused 11 (delta 0), pack-reused 0
Receiving objects: 100% (23/23), 24.58 KiB | 0 bytes/s, done.
git submodule init
git submodule update
Caused by: java.lang.UnsatisfiedLinkError: Could not load the native library.
Error while loading native library "libnd4j-apple-x86_64" with base name "libnd4j"
Operating system name: Mac OS X
Architecture : x86_64
Architecture bit size: 64
Stack trace from the attempt to load the library as a resource:
java.lang.NullPointerException: No resource found with name '/lib/liblibnd4j-apple-x86_64.dylib'
at org.nd4j.linalg.cpu.nativecpu.util.LibUtils.loadLibraryResource(LibUtils.java:149)
at org.nd4j.linalg.cpu.nativecpu.util.LibUtils.loadLibrary(LibUtils.java:83)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOps.<clinit>(NativeOps.java:17)
ClassPathResource resource1 = new ClassPathResource("TopicClassifier/DimMetric-Train.txt");
InputStream is = resource1.getInputStream();
LabelAwareListSentenceIterator iterator1 = new LabelAwareListSentenceIterator(is);
TokenizerFactory t = new DefaultTokenizerFactory();
t.setTokenPreProcessor(new CommonPreprocessor());
StopWatch sw = new StopWatch();
sw.start();