View jumpy_bug.py
import jumpy
import numpy as np
jumpy.init()
def numpy(jp_array):
# convert back to numpy array
array = jp_array.array # INDArray instance
get = array.getDouble
shape = array.shape()
View pom.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.deeplearning4j</groupId>
<artifactId>dl4j</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>dl4j</name>
<url>http://maven.apache.org</url>
View train_neural_bot.py
import numpy as np
from simple_classifier import SimpleClassifier
def vectorize(x):
# vectorize a string
if len(x) > 1:
return np.sum([vectorize(c) for c in x], axis=0)
if x == '.':
i = 27
elif x == ' ':
View neural_net_bot.py
import numpy as np
def vectorize(x):
# vectorize a string
if len(x) > 1:
return np.sum([vectorize(c) for c in x], axis=0)
if x == '.':
i = 27
elif x == ' ':
i = 26
View depth_first_recurrent_container.py
from keras.layers import Recurrent
from keras.models import Sequential
from keras import backend as K
def _isRNN(layer):
return issubclass(layer.__class__, Recurrent)
def _zeros(shape):
View analogy.py
import numpy as np
__author__ = 'Fariz Rahman'
def eq(x, y):
return x.lower().replace(" ", "") == y.lower().replace(" ", "")
def get_words(x):
x = x.replace(" ", " ")