Inspect native CNN architectures
Construct a ResNet50 model without allocating weights or downloading data, inspect its summary and capture an architecture diagram.
// Architecture construction and diagrams need no weight allocation or network download.
import aner.nn
import aner.dev
print(nn.architectures())
let model = nn.vision("resnet50", classes: 10, seed: 42).on("auto")
print(model.summary())
dev.capture("ResNet-50", model)
// Import exact compatible local Safetensors weights before freezing the backbone:
// let transferred = model.load_weights("resnet50.safetensors").freeze_backbone()
// Print Mermaid source for documentation or render through a development report.
if dev.enabled() { print(model.diagram()) }
Make it your experiment.
With Aner 0.0.3 or newer installed, save this program as examples/cnn_architectures.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.
aner check examples/cnn_architectures.aner
aner run examples/cnn_architectures.anerThe aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.
Requires Aner 0.0.4 or newer and matching editor integration. Uses synthetic tensors with no external dataset, credentials or network connection. Supported Mac packages include Metal/MPS; current Linux and Windows packages do not include CUDA or MPI/NCCL. Optional source backends require a compatible runtime and hardware.
aner check examples/cnn_architectures.aner
aner examples/cnn_architectures.anerBundled datasets retain their own source attribution and license notices. Example outcomes are not comparative benchmarks or evidence of clinical validity.
Dataset sources & attribution