Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
working on image reading
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Feb 18, 2020
1 parent d7a78e8 commit 539a761
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 22 deletions.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
54 changes: 36 additions & 18 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified build/kotlin/compileKotlin/build-history.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/last-build.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion build/kotlin/mars121jar-classes.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/Brain.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/BrainType.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/CLI.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/Cell.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/CellBase.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/Generate.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/inputSources/Camera.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/models/StructuredData.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/readers/GetReader.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/readers/TSV.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/run.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/scripts/BasicDemo.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/scripts/VoiceScript.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/util/RunOnGpu$kernel$1.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/util/RunOnGpu.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/Brain.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/BrainType.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/CLI.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/Cell.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/CellBase.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/Generate.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/inputSources/Camera.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/models/StructuredData.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/readers/GetReader.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/readers/TSV.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/scripts/BasicDemo.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/scripts/VoiceScript.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/util/RunOnGpu$kernel$1.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/util/RunOnGpu.class
/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/CellBase.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/brain/StructuredData.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/demos/readers/GetReader.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/demos/readers/TSV.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/demos/scripts/BasicDemo.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/demos/scripts/Image.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/demos/scripts/VoiceScript.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/demos/util/RunOnGpu$kernel$1.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/demos/util/RunOnGpu.class:/home/fulton/Desktop/code/mars/build/classes/java/main/com/andromeda/mars/run.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/CellBase.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/brain/StructuredData.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/demos/readers/GetReader.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/demos/readers/TSV.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/demos/scripts/BasicDemo.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/demos/scripts/Image.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/demos/scripts/VoiceScript.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/demos/util/RunOnGpu$kernel$1.class:/home/fulton/Desktop/code/mars/build/classes/kotlin/main/com/andromeda/mars/demos/util/RunOnGpu.class
Binary file modified build/libs/mars-1.2.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/com/andromeda/mars/brain/CellBase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ open class CellBase {
val parsed = arrayListOf<StructuredData>()
structuredData.forEach {
val intArray = arrayListOf<Int>()
println(it.data)
println(it.data.size)
it.data.forEachIndexed { index, i ->
intArray.add((i - newData[index]).absoluteValue)
}
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/com/andromeda/mars/brain/StructuredData.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package com.andromeda.mars.brain

class StructuredData(val label:Any, val data:ArrayList<Int> ) {
class StructuredData(val label:Any, var data:ArrayList<Int> ) {
fun addData(newData:ArrayList<Int>, cellBase: CellBase){
val newVal = arrayListOf<Int>()
newData.forEachIndexed { index, t ->
cellBase.operation(t, data[index])
newVal.add(cellBase.operation(t, data[index]))
newVal.reverse()
data = newVal
println(data.size)

}
}
}
1 change: 1 addition & 0 deletions src/main/java/com/andromeda/mars/demos/scripts/Image.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import java.io.ObjectInputStream
class Image {
//read the cifar-10 dataset
fun main(){
println("start")
val cell = CellBase()
val file = File(readLine()!!)
val fis = FileInputStream(file)
Expand Down

0 comments on commit 539a761

Please sign in to comment.