Skip to content

Instantly share code, notes, and snippets.

View cawfree's full-sized avatar
😍

cawfree cawfree

😍
View GitHub Profile
@cawfree
cawfree / gist:901c26f42233b7770935fe5bc8869d84
Last active March 17, 2017 23:35
`ModelSerializer` fails on Android. (0.8.0) invoke virtual method flush() on a null Object
/** GRADLE: (Any custom modifications I've made here were required to prevent duplicate file errors! */
// DL4J
provided ('org.deeplearning4j:deeplearning4j-core:0.8.0') {
}
provided ('org.nd4j:nd4j-native:0.8.0') {
//exclude group: 'org.bytedeco.javacpp-presets'
}
provided (group: 'org.nd4j', name: 'nd4j-native-platform', version: '0.8.0') {
//exclude group: 'org.bytedeco.javacpp-presets'
@cawfree
cawfree / gist:2393c90223ab085fe92860759f23b88e
Created February 25, 2017 21:31
02-25 21:14:08.391 16707 16707 E AndroidRuntime: Caused by: org.deeplearning4j.exception.DL4JInvalidConfigException: ConvolutionLayer (index=2, name=(name not set)) nIn=0, nOut=50; nIn and nOut must be > 0
/* Neural Dependencies. */
private static final int IMAGE_WIDTH = 64;
private static final int IMAGE_HEIGHT = 80;
private static final int SEED = 123;
private static final int ITERATIONS = 1;
MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()
.seed(SEED)
.iterations(ITERATIONS) // Training iterations as above
.regularization(true).l2(0.0005)
/*