Last active
February 10, 2021 07:37
-
-
Save lukasjapan/185d474e4b684e411c8141801a5fdfc1 to your computer and use it in GitHub Desktop.
using-deeplearning4j-to-distinguish-between-cats-and-dogs 1
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
val model = VGG16().initPretrained(PretrainedType.IMAGENET) as ComputationGraph | |
val image = FileInputStream("input.png") | |
val input = NativeImageLoader(224, 224, 3).asMatrix(image).also { VGG16ImagePreProcessor().transform(it) } | |
val output = model.outputSingle(input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment