MultiLocaleInference

Usage

use MultiLocaleInference;

or

import MultiLocaleInference;
config const detach = true
type dtype = real(32)
config const numImages = 1
const imagesD = blockDist.createDomain({0..<numImages})
var images = forall i in imagesD do Tensor.load("data/datasets/mnist/image_idx_" + i : string + ".chdata") : dtype
const localeModelsD = blockDist.createDomain(Locales.domain)
var localeModels = forall li in localeModelsD do loadModel(specFile = "scripts/models/cnn/specification.json", weightsFolder = "scripts/models/cnn/", dtype = dtype)
var preds : [imagesD] int
config const numTries = 1
var totalTime : real
const averageTime = totalTime / numTries
config const printResults = false