This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nn' | |
require 'cunn' | |
require 'image' | |
require 'nnx' | |
require 'nngraph' | |
require 'Upsample' | |
require 'util.misc' | |
model_utils = require 'util.model_utils' | |
print('loading image') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |