Search in sources :

Example 1 with DoubleStatistics

use of com.simiacryptus.util.data.DoubleStatistics in project MindsEye by SimiaCryptus.

the class EncodingUtil method decompositionSvg.

/**
 * To svg string.
 *
 * @param log              the log
 * @param baseline         the baseline
 * @param signedComponents the signed components
 * @return the string
 */
public static String decompositionSvg(@Nonnull final NotebookOutput log, @Nonnull final Tensor baseline, @Nonnull final List<Tensor> signedComponents) {
    final List<DoubleStatistics> componentStats = signedComponents.stream().map(t -> new DoubleStatistics().accept(t.getData())).collect(Collectors.toList());
    @Nonnull final CharSequence positiveFilter = IntStream.range(0, signedComponents.size()).mapToObj(i -> {
        String name;
        try {
            name = String.format("component_%s.png", EncodingUtil.imageNumber++);
            ImageIO.write(signedComponents.get(i).map(v -> v > 0 ? v * (0xFF / componentStats.get(i).getMax()) : 0).toImage(), "png", log.file(name));
        } catch (@Nonnull final IOException e) {
            throw new RuntimeException(e);
        }
        return String.format("  <feImage xlink:href=\"%s\" result=\"pos_image_%s\" />\n", name, i);
    }).reduce((a, b) -> a + "\n" + b).get();
    @Nonnull final CharSequence negativeFilter = IntStream.range(0, signedComponents.size()).mapToObj(i -> {
        String name;
        try {
            name = String.format("component_%s.png", EncodingUtil.imageNumber++);
            ImageIO.write(signedComponents.get(i).map(v -> v < 0 ? 0xFF - v * (0xFF / componentStats.get(i).getMin()) : 0).toImage(), "png", log.file(name));
        } catch (@Nonnull final IOException e) {
            throw new RuntimeException(e);
        }
        return String.format("  <feImage xlink:href=\"%s\" result=\"neg_image_%s\" />\n", name, i);
    }).reduce((a, b) -> a + "\n" + b).get();
    @Nonnull final CharSequence compositingFilters = IntStream.range(0, signedComponents.size()).mapToObj(i -> {
        final double fPos = componentStats.get(i).getMax() / 0xFF;
        final double fNeg = componentStats.get(i).getMin() / 0xFF;
        return "  <feComposite in=\"" + (i == 0 ? "FillPaint" : "lastResult") + "\" in2=\"neg_image_" + i + "\" result=\"lastResult\" operator=\"arithmetic\" k1=\"0.0\" k2=\"1.0\" k3=\"" + -fNeg + "\" k4=\"" + fNeg + "\"/>\n" + "  <feComposite in=\"lastResult\" in2=\"pos_image_" + i + "\" result=\"lastResult\" operator=\"arithmetic\" k1=\"0.0\" k2=\"1.0\" k3=\"" + fPos + "\" k4=\"" + 0.0 + "\"/>\n";
    }).reduce((a, b) -> a + "\n" + b).get();
    final int red = (int) baseline.get(0, 0, 0);
    final int green = (int) baseline.get(0, 0, 1);
    final int blue = (int) baseline.get(0, 0, 2);
    @Nonnull final CharSequence avgHexColor = Long.toHexString(red + (green << 8) + (blue << 16));
    return "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n" + ("<defs>\n" + "<filter id=\"image\" >\n" + (positiveFilter + "\n" + negativeFilter + "\n" + compositingFilters).replaceAll("\n", "\n\t") + "\n" + "</filter>\n" + "</defs>\n" + "<rect style=\"filter:url(#image);\" setByCoord=\"#" + avgHexColor + "\" width=\"256\" height=\"256\"/>").replaceAll("\n", "\n\t") + "\n</svg>";
}
Also used : PipelineNetwork(com.simiacryptus.mindseye.network.PipelineNetwork) IntStream(java.util.stream.IntStream) Coordinate(com.simiacryptus.mindseye.lang.Coordinate) Arrays(java.util.Arrays) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) GifSequenceWriter(com.simiacryptus.util.io.GifSequenceWriter) TableOutput(com.simiacryptus.util.TableOutput) LoggerFactory(org.slf4j.LoggerFactory) Tensor(com.simiacryptus.mindseye.lang.Tensor) Caltech101(com.simiacryptus.mindseye.test.data.Caltech101) Function(java.util.function.Function) LinkedHashMap(java.util.LinkedHashMap) ImgBandScaleLayer(com.simiacryptus.mindseye.layers.java.ImgBandScaleLayer) TrainingMonitor(com.simiacryptus.mindseye.opt.TrainingMonitor) ImageIO(javax.imageio.ImageIO) Layer(com.simiacryptus.mindseye.lang.Layer) StepRecord(com.simiacryptus.mindseye.test.StepRecord) NotebookOutput(com.simiacryptus.util.io.NotebookOutput) PCAUtil(com.simiacryptus.mindseye.test.PCAUtil) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) PrintStream(java.io.PrintStream) MeanSqLossLayer(com.simiacryptus.mindseye.layers.java.MeanSqLossLayer) Logger(org.slf4j.Logger) SysOutInterceptor(com.simiacryptus.util.test.SysOutInterceptor) BufferedImage(java.awt.image.BufferedImage) ImgBandSelectLayer(com.simiacryptus.mindseye.layers.java.ImgBandSelectLayer) IOException(java.io.IOException) TestUtil(com.simiacryptus.mindseye.test.TestUtil) FastRandom(com.simiacryptus.util.FastRandom) Collectors(java.util.stream.Collectors) File(java.io.File) DoubleStream(java.util.stream.DoubleStream) ConvolutionLayer(com.simiacryptus.mindseye.layers.cudnn.ConvolutionLayer) List(java.util.List) Stream(java.util.stream.Stream) ScalarStatistics(com.simiacryptus.util.data.ScalarStatistics) ToDoubleFunction(java.util.function.ToDoubleFunction) ImgReshapeLayer(com.simiacryptus.mindseye.layers.java.ImgReshapeLayer) ImgBandBiasLayer(com.simiacryptus.mindseye.layers.java.ImgBandBiasLayer) DAGNetwork(com.simiacryptus.mindseye.network.DAGNetwork) Step(com.simiacryptus.mindseye.opt.Step) Comparator(java.util.Comparator) Nonnull(javax.annotation.Nonnull) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) IOException(java.io.IOException)

Example 2 with DoubleStatistics

use of com.simiacryptus.util.data.DoubleStatistics in project MindsEye by SimiaCryptus.

the class ArtistryUtil method paint_Circles.

/**
 * Paint circles.
 *
 * @param canvas the canvas
 * @param scale  the scale
 */
public static void paint_Circles(final Tensor canvas, final int scale) {
    BufferedImage originalImage = canvas.toImage();
    BufferedImage newImage = new BufferedImage(originalImage.getWidth(), originalImage.getHeight(), BufferedImage.TYPE_INT_ARGB);
    Graphics2D graphics = (Graphics2D) newImage.getGraphics();
    IntStream.range(0, 10000).forEach(i -> {
        Random random = new Random();
        int positionX = random.nextInt(originalImage.getWidth());
        int positionY = random.nextInt(originalImage.getHeight());
        int width = 1 + random.nextInt(2 * scale);
        int height = 1 + random.nextInt(2 * scale);
        DoubleStatistics[] stats = { new DoubleStatistics(), new DoubleStatistics(), new DoubleStatistics() };
        canvas.coordStream(false).filter(c -> {
            int[] coords = c.getCoords();
            int x = coords[0];
            int y = coords[1];
            double relX = Math.pow(1 - 2 * ((double) (x - positionX) / width), 2);
            double relY = Math.pow(1 - 2 * ((double) (y - positionY) / height), 2);
            return relX + relY < 1.0;
        }).forEach(c -> stats[c.getCoords()[2]].accept(canvas.get(c)));
        graphics.setStroke(new Stroke() {

            @Override
            public Shape createStrokedShape(final Shape p) {
                return null;
            }
        });
        graphics.setColor(new Color((int) stats[0].getAverage(), (int) stats[1].getAverage(), (int) stats[2].getAverage()));
        graphics.fillOval(positionX, positionY, width, height);
    });
    canvas.set(Tensor.fromRGB(newImage));
}
Also used : PipelineNetwork(com.simiacryptus.mindseye.network.PipelineNetwork) IntStream(java.util.stream.IntStream) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) ActivationLayer(com.simiacryptus.mindseye.layers.cudnn.ActivationLayer) Tensor(com.simiacryptus.mindseye.lang.Tensor) Random(java.util.Random) ImgBandBiasLayer(com.simiacryptus.mindseye.layers.cudnn.ImgBandBiasLayer) Supplier(java.util.function.Supplier) DoubleUnaryOperator(java.util.function.DoubleUnaryOperator) JsonUtil(com.simiacryptus.util.io.JsonUtil) Precision(com.simiacryptus.mindseye.lang.cudnn.Precision) ImageIO(javax.imageio.ImageIO) Layer(com.simiacryptus.mindseye.lang.Layer) NotebookOutput(com.simiacryptus.util.io.NotebookOutput) PCAUtil(com.simiacryptus.mindseye.test.PCAUtil) Nonnull(javax.annotation.Nonnull) SquareActivationLayer(com.simiacryptus.mindseye.layers.cudnn.SquareActivationLayer) Array2DRowRealMatrix(org.apache.commons.math3.linear.Array2DRowRealMatrix) BufferedImage(java.awt.image.BufferedImage) MimeType(org.apache.hadoop.yarn.webapp.MimeType) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) BandReducerLayer(com.simiacryptus.mindseye.layers.cudnn.BandReducerLayer) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) TestUtil(com.simiacryptus.mindseye.test.TestUtil) FastRandom(com.simiacryptus.util.FastRandom) BandAvgReducerLayer(com.simiacryptus.mindseye.layers.cudnn.BandAvgReducerLayer) File(java.io.File) ConvolutionLayer(com.simiacryptus.mindseye.layers.cudnn.ConvolutionLayer) StreamNanoHTTPD(com.simiacryptus.util.StreamNanoHTTPD) java.awt(java.awt) GramianLayer(com.simiacryptus.mindseye.layers.cudnn.GramianLayer) LinearActivationLayer(com.simiacryptus.mindseye.layers.java.LinearActivationLayer) SerializationFeature(com.fasterxml.jackson.databind.SerializationFeature) MultiPrecision(com.simiacryptus.mindseye.layers.cudnn.MultiPrecision) PoolingLayer(com.simiacryptus.mindseye.layers.cudnn.PoolingLayer) DAGNetwork(com.simiacryptus.mindseye.network.DAGNetwork) Random(java.util.Random) FastRandom(com.simiacryptus.util.FastRandom) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) BufferedImage(java.awt.image.BufferedImage)

Example 3 with DoubleStatistics

use of com.simiacryptus.util.data.DoubleStatistics in project MindsEye by SimiaCryptus.

the class TestUtil method renderToImages.

/**
 * Render to images stream.
 *
 * @param tensor    the tensor
 * @param normalize the normalize
 * @return the stream
 */
public static Stream<BufferedImage> renderToImages(@Nonnull final Tensor tensor, final boolean normalize) {
    final DoubleStatistics[] statistics = IntStream.range(0, tensor.getDimensions()[2]).mapToObj(band -> {
        return new DoubleStatistics().accept(tensor.coordStream(false).filter(x -> x.getCoords()[2] == band).mapToDouble(c -> tensor.get(c)).toArray());
    }).toArray(i -> new DoubleStatistics[i]);
    @Nonnull final BiFunction<Double, DoubleStatistics, Double> transform = (value, stats) -> {
        final double width = Math.sqrt(2) * stats.getStandardDeviation();
        final double centered = value - stats.getAverage();
        final double distance = Math.abs(value - stats.getAverage());
        final double positiveMax = stats.getMax() - stats.getAverage();
        final double negativeMax = stats.getAverage() - stats.getMin();
        final double unitValue;
        if (value < centered) {
            if (distance > width) {
                unitValue = 0.25 - 0.25 * ((distance - width) / (negativeMax - width));
            } else {
                unitValue = 0.5 - 0.25 * (distance / width);
            }
        } else {
            if (distance > width) {
                unitValue = 0.75 + 0.25 * ((distance - width) / (positiveMax - width));
            } else {
                unitValue = 0.5 + 0.25 * (distance / width);
            }
        }
        return 0xFF * unitValue;
    };
    tensor.coordStream(true).collect(Collectors.groupingBy(x -> x.getCoords()[2], Collectors.toList()));
    @Nullable final Tensor normal = tensor.mapCoords((c) -> transform.apply(tensor.get(c), statistics[c.getCoords()[2]])).map(v -> Math.min(0xFF, Math.max(0, v)));
    return (normalize ? normal : tensor).toImages().stream();
}
Also used : Arrays(java.util.Arrays) ScheduledFuture(java.util.concurrent.ScheduledFuture) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) IntUnaryOperator(java.util.function.IntUnaryOperator) BiFunction(java.util.function.BiFunction) LoggerFactory(org.slf4j.LoggerFactory) DoubleSummaryStatistics(java.util.DoubleSummaryStatistics) TrainingMonitor(com.simiacryptus.mindseye.opt.TrainingMonitor) Map(java.util.Map) ImageIO(javax.imageio.ImageIO) Layer(com.simiacryptus.mindseye.lang.Layer) URI(java.net.URI) Graph(guru.nidi.graphviz.model.Graph) LongToIntFunction(java.util.function.LongToIntFunction) StochasticComponent(com.simiacryptus.mindseye.layers.java.StochasticComponent) BufferedImage(java.awt.image.BufferedImage) UUID(java.util.UUID) ComponentEvent(java.awt.event.ComponentEvent) WindowAdapter(java.awt.event.WindowAdapter) DAGNode(com.simiacryptus.mindseye.network.DAGNode) Collectors(java.util.stream.Collectors) WindowEvent(java.awt.event.WindowEvent) Executors(java.util.concurrent.Executors) List(java.util.List) Stream(java.util.stream.Stream) ScalarStatistics(com.simiacryptus.util.data.ScalarStatistics) LoggingWrapperLayer(com.simiacryptus.mindseye.layers.java.LoggingWrapperLayer) DAGNetwork(com.simiacryptus.mindseye.network.DAGNetwork) IntStream(java.util.stream.IntStream) MonitoringWrapperLayer(com.simiacryptus.mindseye.layers.java.MonitoringWrapperLayer) ActionListener(java.awt.event.ActionListener) ScatterPlot(smile.plot.ScatterPlot) ByteArrayOutputStream(java.io.ByteArrayOutputStream) LinkSource(guru.nidi.graphviz.model.LinkSource) Tensor(com.simiacryptus.mindseye.lang.Tensor) HashMap(java.util.HashMap) Supplier(java.util.function.Supplier) JsonUtil(com.simiacryptus.util.io.JsonUtil) MutableNode(guru.nidi.graphviz.model.MutableNode) Charset(java.nio.charset.Charset) Factory(guru.nidi.graphviz.model.Factory) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) NotebookOutput(com.simiacryptus.util.io.NotebookOutput) WeakReference(java.lang.ref.WeakReference) LinkTarget(guru.nidi.graphviz.model.LinkTarget) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) LongSummaryStatistics(java.util.LongSummaryStatistics) PrintStream(java.io.PrintStream) Logger(org.slf4j.Logger) PlotCanvas(smile.plot.PlotCanvas) RankDir(guru.nidi.graphviz.attribute.RankDir) IOException(java.io.IOException) FileFilter(javax.swing.filechooser.FileFilter) ActionEvent(java.awt.event.ActionEvent) PercentileStatistics(com.simiacryptus.util.data.PercentileStatistics) File(java.io.File) java.awt(java.awt) ComponentAdapter(java.awt.event.ComponentAdapter) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) MonitoredObject(com.simiacryptus.util.MonitoredObject) IntToLongFunction(java.util.function.IntToLongFunction) Link(guru.nidi.graphviz.model.Link) Step(com.simiacryptus.mindseye.opt.Step) Comparator(java.util.Comparator) javax.swing(javax.swing) Tensor(com.simiacryptus.mindseye.lang.Tensor) Nonnull(javax.annotation.Nonnull) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) Nullable(javax.annotation.Nullable)

Example 4 with DoubleStatistics

use of com.simiacryptus.util.data.DoubleStatistics in project MindsEye by SimiaCryptus.

the class TestUtil method normalizeBands.

/**
 * Normalize bands tensor.
 *
 * @param image the image
 * @param max   the max
 * @return the tensor
 */
public static Tensor normalizeBands(final Tensor image, final int max) {
    DoubleStatistics[] statistics = IntStream.range(0, image.getDimensions()[2]).mapToObj(i -> new DoubleStatistics()).toArray(i -> new DoubleStatistics[i]);
    image.coordStream(false).forEach(c -> {
        double value = image.get(c);
        statistics[c.getCoords()[2]].accept(value);
    });
    return image.mapCoords(c -> {
        double value = image.get(c);
        DoubleStatistics statistic = statistics[c.getCoords()[2]];
        return max * (value - statistic.getMin()) / (statistic.getMax() - statistic.getMin());
    });
}
Also used : Arrays(java.util.Arrays) ScheduledFuture(java.util.concurrent.ScheduledFuture) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) IntUnaryOperator(java.util.function.IntUnaryOperator) BiFunction(java.util.function.BiFunction) LoggerFactory(org.slf4j.LoggerFactory) DoubleSummaryStatistics(java.util.DoubleSummaryStatistics) TrainingMonitor(com.simiacryptus.mindseye.opt.TrainingMonitor) Map(java.util.Map) ImageIO(javax.imageio.ImageIO) Layer(com.simiacryptus.mindseye.lang.Layer) URI(java.net.URI) Graph(guru.nidi.graphviz.model.Graph) LongToIntFunction(java.util.function.LongToIntFunction) StochasticComponent(com.simiacryptus.mindseye.layers.java.StochasticComponent) BufferedImage(java.awt.image.BufferedImage) UUID(java.util.UUID) ComponentEvent(java.awt.event.ComponentEvent) WindowAdapter(java.awt.event.WindowAdapter) DAGNode(com.simiacryptus.mindseye.network.DAGNode) Collectors(java.util.stream.Collectors) WindowEvent(java.awt.event.WindowEvent) Executors(java.util.concurrent.Executors) List(java.util.List) Stream(java.util.stream.Stream) ScalarStatistics(com.simiacryptus.util.data.ScalarStatistics) LoggingWrapperLayer(com.simiacryptus.mindseye.layers.java.LoggingWrapperLayer) DAGNetwork(com.simiacryptus.mindseye.network.DAGNetwork) IntStream(java.util.stream.IntStream) MonitoringWrapperLayer(com.simiacryptus.mindseye.layers.java.MonitoringWrapperLayer) ActionListener(java.awt.event.ActionListener) ScatterPlot(smile.plot.ScatterPlot) ByteArrayOutputStream(java.io.ByteArrayOutputStream) LinkSource(guru.nidi.graphviz.model.LinkSource) Tensor(com.simiacryptus.mindseye.lang.Tensor) HashMap(java.util.HashMap) Supplier(java.util.function.Supplier) JsonUtil(com.simiacryptus.util.io.JsonUtil) MutableNode(guru.nidi.graphviz.model.MutableNode) Charset(java.nio.charset.Charset) Factory(guru.nidi.graphviz.model.Factory) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) NotebookOutput(com.simiacryptus.util.io.NotebookOutput) WeakReference(java.lang.ref.WeakReference) LinkTarget(guru.nidi.graphviz.model.LinkTarget) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) LongSummaryStatistics(java.util.LongSummaryStatistics) PrintStream(java.io.PrintStream) Logger(org.slf4j.Logger) PlotCanvas(smile.plot.PlotCanvas) RankDir(guru.nidi.graphviz.attribute.RankDir) IOException(java.io.IOException) FileFilter(javax.swing.filechooser.FileFilter) ActionEvent(java.awt.event.ActionEvent) PercentileStatistics(com.simiacryptus.util.data.PercentileStatistics) File(java.io.File) java.awt(java.awt) ComponentAdapter(java.awt.event.ComponentAdapter) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) MonitoredObject(com.simiacryptus.util.MonitoredObject) IntToLongFunction(java.util.function.IntToLongFunction) Link(guru.nidi.graphviz.model.Link) Step(com.simiacryptus.mindseye.opt.Step) Comparator(java.util.Comparator) javax.swing(javax.swing) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics)

Example 5 with DoubleStatistics

use of com.simiacryptus.util.data.DoubleStatistics in project MindsEye by SimiaCryptus.

the class QuantifyOrientationWrapper method orient.

@Override
public LineSearchCursor orient(final Trainable subject, final PointSample measurement, @Nonnull final TrainingMonitor monitor) {
    final LineSearchCursor cursor = inner.orient(subject, measurement, monitor);
    if (cursor instanceof SimpleLineSearchCursor) {
        final DeltaSet<Layer> direction = ((SimpleLineSearchCursor) cursor).direction;
        @Nonnull final StateSet<Layer> weights = ((SimpleLineSearchCursor) cursor).origin.weights;
        final Map<CharSequence, CharSequence> dataMap = weights.stream().collect(Collectors.groupingBy(x -> getId(x), Collectors.toList())).entrySet().stream().collect(Collectors.toMap(x -> x.getKey(), list -> {
            final List<Double> doubleList = list.getValue().stream().map(weightDelta -> {
                final DoubleBuffer<Layer> dirDelta = direction.getMap().get(weightDelta.layer);
                final double denominator = weightDelta.deltaStatistics().rms();
                final double numerator = null == dirDelta ? 0 : dirDelta.deltaStatistics().rms();
                return numerator / (0 == denominator ? 1 : denominator);
            }).collect(Collectors.toList());
            if (1 == doubleList.size())
                return Double.toString(doubleList.get(0));
            return new DoubleStatistics().accept(doubleList.stream().mapToDouble(x -> x).toArray()).toString();
        }));
        monitor.log(String.format("Line search stats: %s", dataMap));
    } else {
        monitor.log(String.format("Non-simple cursor: %s", cursor));
    }
    return cursor;
}
Also used : DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) DoubleBuffer(com.simiacryptus.mindseye.lang.DoubleBuffer) Collectors(java.util.stream.Collectors) StateSet(com.simiacryptus.mindseye.lang.StateSet) Trainable(com.simiacryptus.mindseye.eval.Trainable) List(java.util.List) TrainingMonitor(com.simiacryptus.mindseye.opt.TrainingMonitor) Map(java.util.Map) Layer(com.simiacryptus.mindseye.lang.Layer) SimpleLineSearchCursor(com.simiacryptus.mindseye.opt.line.SimpleLineSearchCursor) DeltaSet(com.simiacryptus.mindseye.lang.DeltaSet) LineSearchCursor(com.simiacryptus.mindseye.opt.line.LineSearchCursor) Nonnull(javax.annotation.Nonnull) PointSample(com.simiacryptus.mindseye.lang.PointSample) Nonnull(javax.annotation.Nonnull) Layer(com.simiacryptus.mindseye.lang.Layer) SimpleLineSearchCursor(com.simiacryptus.mindseye.opt.line.SimpleLineSearchCursor) LineSearchCursor(com.simiacryptus.mindseye.opt.line.LineSearchCursor) DoubleStatistics(com.simiacryptus.util.data.DoubleStatistics) SimpleLineSearchCursor(com.simiacryptus.mindseye.opt.line.SimpleLineSearchCursor) List(java.util.List)

Aggregations

DoubleStatistics (com.simiacryptus.util.data.DoubleStatistics)8 Nonnull (javax.annotation.Nonnull)8 Layer (com.simiacryptus.mindseye.lang.Layer)7 Tensor (com.simiacryptus.mindseye.lang.Tensor)7 NotebookOutput (com.simiacryptus.util.io.NotebookOutput)6 List (java.util.List)6 Collectors (java.util.stream.Collectors)6 IntStream (java.util.stream.IntStream)6 DAGNetwork (com.simiacryptus.mindseye.network.DAGNetwork)5 Arrays (java.util.Arrays)5 Stream (java.util.stream.Stream)5 Nullable (javax.annotation.Nullable)5 TrainingMonitor (com.simiacryptus.mindseye.opt.TrainingMonitor)4 BufferedImage (java.awt.image.BufferedImage)4 File (java.io.File)4 IOException (java.io.IOException)4 Comparator (java.util.Comparator)4 Supplier (java.util.function.Supplier)4 ImageIO (javax.imageio.ImageIO)4 Logger (org.slf4j.Logger)4