Advertisement

DeepLearning4j 转换INDArray 至图像

阅读量:

三通通道彩色图分析

代码来源为:https://github.com/sjsdfg/dl4j-tutorials/blob/master/src/main/java/styletransfer/NeuralStyleTransfer.java>

复制代码
     /** * Takes an INDArray containing an image loaded using the native image loader
     * libraries associated with DL4J, and converts it into a BufferedImage.
     * The INDArray contains the color values split up across three channels (RGB)
     * and in the integer range 0-255.
     * * @param array INDArray containing an image
     * @return BufferedImage
     */
    private BufferedImage imageFromINDArray(INDArray array) {
    long[] shape = array.sha

全部评论 (0)

还没有任何评论哟~