Search in sources :

Example 1 with CudaError

use of com.simiacryptus.mindseye.lang.cudnn.CudaError in project MindsEye by SimiaCryptus.

the class StandardLayerTests method bigTests.

/**
 * Big tests.
 *
 * @param log        the log
 * @param seed       the seed
 * @param perfLayer  the perf layer
 * @param exceptions the exceptions
 */
public void bigTests(NotebookOutput log, long seed, @Nonnull Layer perfLayer, @Nonnull ArrayList<TestError> exceptions) {
    getBigTests().stream().filter(x -> null != x).forEach(test -> {
        @Nonnull Layer layer = perfLayer.copy();
        try {
            Tensor[] input = randomize(getLargeDims(new Random(seed)));
            try {
                test.test(log, layer, input);
            } finally {
                for (@Nonnull Tensor t : input) {
                    t.freeRef();
                }
            }
        } catch (LifecycleException e) {
            throw e;
        } catch (CudaError e) {
            throw e;
        } catch (Throwable e) {
            exceptions.add(new TestError(e, test, layer));
        } finally {
            layer.freeRef();
            test.freeRef();
            System.gc();
        }
    });
}
Also used : JsonObject(com.google.gson.JsonObject) Graphviz(guru.nidi.graphviz.engine.Graphviz) Arrays(java.util.Arrays) Tensor(com.simiacryptus.mindseye.lang.Tensor) ReferenceCountingBase(com.simiacryptus.mindseye.lang.ReferenceCountingBase) NotebookReportBase(com.simiacryptus.mindseye.test.NotebookReportBase) HashMap(java.util.HashMap) Random(java.util.Random) Result(com.simiacryptus.mindseye.lang.Result) DataSerializer(com.simiacryptus.mindseye.lang.DataSerializer) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Format(guru.nidi.graphviz.engine.Format) Map(java.util.Map) Layer(com.simiacryptus.mindseye.lang.Layer) CudaError(com.simiacryptus.mindseye.lang.cudnn.CudaError) NotebookOutput(com.simiacryptus.util.io.NotebookOutput) ReferenceCounting(com.simiacryptus.mindseye.lang.ReferenceCounting) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) SysOutInterceptor(com.simiacryptus.util.test.SysOutInterceptor) Collection(java.util.Collection) TestUtil(com.simiacryptus.mindseye.test.TestUtil) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) LayerBase(com.simiacryptus.mindseye.lang.LayerBase) Explodable(com.simiacryptus.mindseye.layers.cudnn.Explodable) ToleranceStatistics(com.simiacryptus.mindseye.test.ToleranceStatistics) DAGNetwork(com.simiacryptus.mindseye.network.DAGNetwork) LifecycleException(com.simiacryptus.mindseye.lang.LifecycleException) CudaError(com.simiacryptus.mindseye.lang.cudnn.CudaError) LifecycleException(com.simiacryptus.mindseye.lang.LifecycleException) Tensor(com.simiacryptus.mindseye.lang.Tensor) Random(java.util.Random) Nonnull(javax.annotation.Nonnull) Layer(com.simiacryptus.mindseye.lang.Layer)

Aggregations

JsonObject (com.google.gson.JsonObject)1 DataSerializer (com.simiacryptus.mindseye.lang.DataSerializer)1 Layer (com.simiacryptus.mindseye.lang.Layer)1 LayerBase (com.simiacryptus.mindseye.lang.LayerBase)1 LifecycleException (com.simiacryptus.mindseye.lang.LifecycleException)1 ReferenceCounting (com.simiacryptus.mindseye.lang.ReferenceCounting)1 ReferenceCountingBase (com.simiacryptus.mindseye.lang.ReferenceCountingBase)1 Result (com.simiacryptus.mindseye.lang.Result)1 Tensor (com.simiacryptus.mindseye.lang.Tensor)1 CudaError (com.simiacryptus.mindseye.lang.cudnn.CudaError)1 Explodable (com.simiacryptus.mindseye.layers.cudnn.Explodable)1 DAGNetwork (com.simiacryptus.mindseye.network.DAGNetwork)1 NotebookReportBase (com.simiacryptus.mindseye.test.NotebookReportBase)1 TestUtil (com.simiacryptus.mindseye.test.TestUtil)1 ToleranceStatistics (com.simiacryptus.mindseye.test.ToleranceStatistics)1 NotebookOutput (com.simiacryptus.util.io.NotebookOutput)1 SysOutInterceptor (com.simiacryptus.util.test.SysOutInterceptor)1 Format (guru.nidi.graphviz.engine.Format)1 Graphviz (guru.nidi.graphviz.engine.Graphviz)1 File (java.io.File)1