Subreport: Logs for com.simiacryptus.ref.lang.ReferenceCountingBase
NeuronTiledRotor.scala:77 executed in 0.00 seconds (0.000 gc):
() => {
implicit val implicitLog = log
// First, basic configuration so we publish to our s3 site
if (Option(s3bucket).filter(!_.isEmpty).isDefined)
log.setArchiveHome(URI.create(s"s3://$s3bucket/$className/${log.getId}/"))
log.onComplete(() => upload(log): Unit)
for((layer,toDim)<-List(
//(VGG19.VGG19_1b2, 128),
//(VGG19.VGG19_1c2, 255),
//(VGG19.VGG19_1c4, 255),
(VGG19.VGG19_1d4, 64)
//(VGG19.VGG19_1e4, 512)
)) {
val fromDim = Math.max(0, toDim-64)
val animationDelay = 1000
val renderedCanvases = new ArrayBuffer[() => BufferedImage]
// Execute the main process while registered with the site index
val registration = registerWithIndexGIF(renderedCanvases.filter(_!=null).map(_ ()), delay = animationDelay)
withMonitoredGif(() => renderedCanvases.filter(_!=null).map(_ ()), delay = animationDelay) {
try {
log.subreport("Neurons in " + layer.name(), (sub:NotebookOutput)=>{
for ((list, page) <- (fromDim until toDim).toStream.grouped(8).zipWithIndex.toStream) {
sub.subreport("Page " + page, (sub2: NotebookOutput) => {
for (dimensionSelected <- list) {
sub2.h2(layer.name() + " " + dimensionSelected)
var image: BufferedImage = null
renderedCanvases += (() => image)
(1 to repeat).map(_ => {
image = test(layer, dimensionSelected)(sub2)
})
}
})
}
})
null
} finally {
registration.foreach(_.stop()(s3client, ec2client))
}
}
}
}
Returns
{ }