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();
}
});
}
Aggregations