Best way to use multiple trained params on different objects together

Hello Guys,
I am asking a basic 101 question but the thing is we have trained the faster_rcnn_resnet50_v1b 2 times on different objects and now my basic code looks like this:

from gluoncv import model_zoo, data, utils
from matplotlib import pyplot as plt
net = model_zoo.get_model('faster_rcnn_resnet50_v1b_voc', pretrained=True, ctx=mx.gpu())
im_fname = '/home/ubuntu/notebooks/deeplearning_stuff/VOCtemplate/VOC2018/JPEGImages/200425094324_328899_6548_4326.jpg'
x, img = data.transforms.presets.rcnn.load_test(im_fname, short=512)
x = x.copyto(mx.gpu())

print('Shape of pre-processed image:', x.shape)
net.reset_class(['abc_object'], reuse_weights={'abc_object': 'abc_object'})

class_IDs, scores, bounding_boxs = net(x)

I am having trouble in the net.load_parameters() how can I load two different set of trained weights and perform the prediction??

Hi, I am not sure what you are trying to achieve, but you can:

load first -->
do prediction -->
load second-->
do prediction. 


class_IDs1, scores1, bounding_boxs1 = net(x)

class_IDs2, scores2, bounding_boxs2 = net(x)

Hi @feevos,
Thanks for the reply!
But when I do as you suggested, I get

AssertionError: Failed loading Parameter 'fasterrcnn6_fasterrcnn6_dense0_weight' from saved params: shape incompatible expected (2, 2048) vs saved (21, 2048)

Hi @feevos anything I am doing wrong?

I am afraid I cannot help further with this.