func loadModel()

in SemanticSegmentationSample/SemanticSegmentationSample/DataModel.swift [87:100]


    func loadModel() throws {
        print("Loading model...")

        let clock = ContinuousClock()
        let start = clock.now

        model = try DETRResnet50SemanticSegmentationF16()
        if let model = model {
            postProcessor = try DETRPostProcessor(model: model.model)
        }

        let duration = clock.now - start
        print("Model loaded (took \(duration.formatted(.units(allowed: [.seconds, .milliseconds]))))")
    }