All examples
Neural networks

Inspect native CNN architectures

Construct a ResNet50 model without allocating weights or downloading data, inspect its summary and capture an architecture diagram.

cnn_architectures.aner
// 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.

Terminal
aner check examples/cnn_architectures.aner
aner run examples/cnn_architectures.aner

The 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.

Credential setup
aner check examples/cnn_architectures.aner
aner examples/cnn_architectures.aner

Bundled datasets retain their own source attribution and license notices. Example outcomes are not comparative benchmarks or evidence of clinical validity.

Dataset sources & attribution
Install Aner