Both libraries perform ImageNet-style top-k classification on a single output tensor with 1000 logits. They support INT8 (auto-dequantized), FP32, BF16, and FP16 tensor data types.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
int |
1 |
Number of top-scoring classes to return. |
|
string |
(required) |
Path to a text file with one class label per line (1000 lines for ImageNet). Initialization fails if the file is missing or unreadable. |
|
bool |
false |
Skip the softmax computation before top-k selection. Use this when the model already outputs probabilities. ResNet50 only – the ResNet18 library always applies softmax and does not recognize this field. |
Example library-config for ResNet50:
{
"library-config": {
"topk": 5,
"label-file-path": "/usr/share/vvas/resnet50/labels.txt",
"disable-softmax": false
}
}