Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created February 12, 2016 19:37
Show Gist options
  • Save zeryx/801af74815e4dba67876 to your computer and use it in GitHub Desktop.
Save zeryx/801af74815e4dba67876 to your computer and use it in GitHub Desktop.
var itrTrain: Int = 0
trainDirectoryLabels.foreach(directory => {
val label = itrTrain
itrTrain += 1
val images = directory.listFiles.toList
images.foreach(image => {
val vec = new ImageVectorizer(image, numOfTrainLabels, label)
val imageSet: DataSet = vec.vectorize()
model.fit(imageSet)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment