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
package org.fogbeam.dl4j.spark; | |
import java.io.File; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.spark.SparkConf; | |
import org.apache.spark.api.java.JavaPairRDD; | |
import org.apache.spark.api.java.JavaRDD; |
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
JavaPairRDD<String, PortableDataStream> origData = sc.binaryFiles("/home/prhodes/development/experimental/ai_exp/NeuralNetworkSandbox/mnist_png/cutdown/0/**"); | |
ImageRecordReader irr = new ImageRecordReader(28, 28, 1, new ParentPathLabelGenerator() ); | |
List<String> labelsList = Arrays.asList( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ); | |
irr.setLabels(labelsList); | |
RecordReaderFunction rrf = new RecordReaderFunction(irr); | |
JavaRDD<List<Writable>> rdd = origData.map(rrf); | |
System.out.println( "DataSet RDD created"); |
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
JavaPairRDD<String, PortableDataStream> origData = sc.binaryFiles("/home/prhodes/development/experimental/ai_exp/NeuralNetworkSandbox/mnist_png/cutdown/0/**"); | |
ImageRecordReader irr = new ImageRecordReader(28, 28, 1, new ParentPathLabelGenerator() ); | |
List<String> labelsList = Arrays.asList( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ); | |
irr.setLabels(labelsList); | |
RecordReaderFunction rrf = new RecordReaderFunction(irr); | |
JavaRDD<List<Writable>> rdd = origData.map(rrf); | |
System.out.println( "DataSet RDD created"); |
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
JavaPairRDD<String, PortableDataStream> origData = sc.binaryFiles("/home/prhodes/development/experimental/ai_exp/NeuralNetworkSandbox/mnist_png/training/**"); | |
ImageRecordReader irr = new ImageRecordReader(28,28,1,new ParentPathLabelGenerator()); | |
List<String> labelsList = Arrays.asList( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ); | |
irr.setLabels(labelsList); | |
RecordReaderFunction rrf = new RecordReaderFunction(irr); | |
JavaRDD<List<Writable>> rdd = origData.map(rrf); | |
System.out.println( "DataSet RDD created"); |
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
package org.fogbeam.dl4j.spark; | |
import java.util.Arrays; | |
import java.util.List; | |
import org.apache.spark.SparkConf; | |
import org.apache.spark.api.java.JavaPairRDD; | |
import org.apache.spark.api.java.JavaRDD; | |
import org.apache.spark.api.java.JavaSparkContext; | |
import org.apache.spark.input.PortableDataStream; |
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
package org.fogbeam.dl4j.spark; | |
import java.util.Arrays; | |
import java.util.List; | |
import org.apache.spark.SparkConf; | |
import org.apache.spark.api.java.JavaPairRDD; | |
import org.apache.spark.api.java.JavaRDD; | |
import org.apache.spark.api.java.JavaSparkContext; | |
import org.apache.spark.input.PortableDataStream; |
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
17/02/25 12:32:41 INFO deprecation: map.input.start is deprecated. Instead, use mapreduce.map.input.start | |
17/02/25 12:32:41 INFO deprecation: mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir | |
17/02/25 12:32:41 INFO deprecation: map.input.length is deprecated. Instead, use mapreduce.map.input.length | |
17/02/25 12:32:42 INFO deprecation: map.input.file is deprecated. Instead, use mapreduce.map.input.file | |
17/02/25 12:32:42 INFO Nd4jBackend: Loaded [CpuBackend] backend | |
17/02/25 12:32:42 INFO NativeOpsHolder: Number of threads used for NativeOps: 4 | |
17/02/25 12:32:43 INFO Reflections: Reflections took 242 ms to scan 12 urls, producing 29 keys and 176 values | |
17/02/25 12:32:44 INFO Reflections: Reflections took 595 ms to scan 12 urls, producing 368 keys and 1424 values | |
17/02/25 12:32:44 ERROR Executor: Exception in task 0.0 in stage 0.0 (TID 0) | |
java.lang.NumberFormatException: For input string: "[[[[0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, |
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
AWSCredentials credentials = null; | |
try | |
{ | |
credentials = new PropertiesFileCredentialsProvider( "credentials.properties" ).getCredentials(); | |
} | |
catch (Exception e) | |
{ | |
throw new AmazonClientException( | |
"Cannot load the credentials from the credential profiles file. " + | |
"Please make sure that your credentials file is at the correct " + |
NewerOlder