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
import tensorflow as tf | |
import numpy as np | |
class TextCNN(object): | |
""" | |
A CNN for text classification. | |
Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer. | |
""" | |
def __init__( |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<repositories> | |
<repository> | |
<id>sonatype-snapshots</id> | |
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> | |
<releases> | |
<enabled>false</enabled> | |
</releases> | |
<snapshots> | |
<enabled>true</enabled> |
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
Exception in thread "main" java.lang.ExceptionInInitializerError | |
at org.nd4j.linalg.jcublas.ops.executioner.JCudaExecutioner.<init>(JCudaExecutioner.java:57) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) | |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) | |
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) | |
at java.lang.Class.newInstance(Class.java:383) | |
at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:4551) | |
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:4499) | |
at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:140) |