Skip to content

Instantly share code, notes, and snippets.

@shenkev
shenkev / pom.xml
Created November 29, 2016 20:42
my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Robocode</groupId>
<artifactId>Robocode</artifactId>
<version>0.0.1-SNAPSHOT</version>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
@shenkev
shenkev / Console Error
Created November 29, 2016 20:47
Console Error
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.nd4j.nativeblas.NativeOpsHolder.<init>(NativeOpsHolder.java:16)
at org.nd4j.nativeblas.NativeOpsHolder.<clinit>(NativeOpsHolder.java:9)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.<init>(NativeOpExecutioner.java:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:5441)
@shenkev
shenkev / pom.xml
Created November 29, 2016 20:48
updated pom
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>Robocode</groupId>
<artifactId>Robocode</artifactId>
<version>0.0.1-SNAPSHOT</version>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
@shenkev
shenkev / pom.xml
Created November 29, 2016 21:10
updated 2 pom
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>Robocode</groupId>
<artifactId>Robocode</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<nd4j.backend>nd4j-native-platform</nd4j.backend>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<shadedClassifier>bin</shadedClassifier>
@shenkev
shenkev / power shell console
Created November 29, 2016 21:15
mvn clean install
PS D:\workspace\Robocode> mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for Robocode:Robocode:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ line 28, colum
n 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
@shenkev
shenkev / NN
Created December 3, 2016 23:27
Neural Network configuration
double regularize = 0.000001;
double dropOut = 0.0;
int numEpochs = 3000;
int batchSize = 2000;
int printEvery = Xarr.length/batchSize;
// Dimensions
int features = 13;
int lay1 = 100;
int lay2 = 6;
@shenkev
shenkev / NN
Created December 3, 2016 23:38
// Network Parameters
int rngSeed = 123; // random number seed for reproducibility
final Random rng = new Random(rngSeed);
OptimizationAlgorithm algo = OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT;
int iterations = 1; //Number of iterations per minibatch
String hiddenAct = "tanh";
String outAct = "tanh";
Updater updater = Updater.ADAGRAD;
// Learning Parameters
@shenkev
shenkev / Error
Created December 4, 2016 22:47
Out of memory console error
! @729lio93n - Internal server error, for (GET) [/train/overview/data] ->
play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[InvocationTargetException: null]]
at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:265) ~[play_2.10-2.4.6.jar:2.4.6]
at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:191) ~[play_2.10-2.4.6.jar:2.4.6]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$9$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:151) [play-netty-server_2.10-2.4.6.jar:2.4.6]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$9$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:148) [play-netty-server_2.10-2.4.6.jar:2.4.6]
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) [scala-library-2.10.5.jar:na]
at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185) [scala-library-2.10.5.jar:na]
at scala.util.Try$.apply(Try.scala:161) [scala-l
@shenkev
shenkev / train
Created December 4, 2016 22:48
Configuration and training file
//Initialize the user interface backend
UIServer uiServer = UIServer.getInstance();
//Configure where the network information (gradients, score vs. time etc) is to be stored. Here: store in memory.
StatsStorage statsStorage = new InMemoryStatsStorage(); //Alternative: new FileStatsStorage(File), for saving and loading later
//Attach the StatsStorage instance to the UI: this allows the contents of the StatsStorage to be visualized
uiServer.attach(statsStorage);
Object[] dat = offlineTraining.loadOfflineDat();
@shenkev
shenkev / Error Console Output
Created December 5, 2016 04:58
ArbiterUIServer.getInstance() throws NoClassDefFoundError
20:55:54.494 [main] INFO org.reflections.Reflections - Reflections took 178 ms to scan 12 urls, producing 29 keys and 172 values
20:55:54.801 [main] INFO o.d.a.s.l.m.LocalMultiLayerNetworkSaver - LocalMultiLayerNetworkSaver saving networks to local directory: ./hyperParamSearch/
Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/validator/spi/valuehandling/ValidatedValueUnwrapper
at io.dropwizard.Application.run(Application.java:68)
at org.deeplearning4j.arbiter.optimize.ui.ArbiterUIServer.getInstance(ArbiterUIServer.java:153)
at RandomGridSearch.main(RandomGridSearch.java:183)
Caused by: java.lang.ClassNotFoundException: org.hibernate.validator.spi.valuehandling.ValidatedValueUnwrapper
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)