Here is the code I am trying to run to access the model with custom classes:
import mxnet as mx
from matplotlib import pyplot as plt
from gluoncv import model_zoo, data, utils
net = model_zoo.get_model('faster_rcnn_resnet50_v1b_voc', pretrained=True,
ctx=mx.gpu())
net.load_parameters('faster_rcnn_resnet50_v1b_voc_1699_0.9477.params')
net.reset_class(['abc', 'xyz', '123', '456', '896', '789'],
reuse_weights={"abc": "abc", "xyz": "xyz", "123": "123", "456": "456", "896":
"896", "789": "789"})
Error:
`
~/miniconda3/envs/py37_venv/lib/python3.7/site-packages/gluoncv/model_zoo/rcnn/rcnn.py
in reset_class(self, classes, reuse_weights)`
` 242`
` 243 for k, v in reuse_weights.items():`
` --> 244 if k >= len(self.classes) or v >=
len(old_classes):`
`245 warnings.warn("reuse mapping
{}/{} -> {}/{} out of range".format(`
` 246 k, self.classes, v,
old_classes))`
TypeError: '>=' not supported between instances of 'str' and 'int'
---
[Visit Topic](https://discuss.mxnet.io/t/error-resetting-the-class/6560/1) or
reply to this email to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click
here](https://discuss.mxnet.io/email/unsubscribe/4ab816909ceb0bb91275f900625a3069f4ea1b6ca425d052e7b8768ac7f203e8).