ValueError: not enough values to unpack (expected 2, got 1)


#1

Hi everyone,
I am doing mxnet rcnn trainign on my own data.
my data is of 512x512x3.
i am using mobilenet instead of vgg or resnet as a backbone.
i have added a symbol file in rcnn with mobilenet netowork.
i have params file of mobilenet0.25…
but when i run the training end2end.py script with network as mobilenet,
i am getting this below error.

Traceback (most recent call last):
File “train_end2end.py”, line 195, in
main()
File “train_end2end.py”, line 192, in main
lr=args.lr, lr_step=args.lr_step)
File “train_end2end.py”, line 84, in train_net
arg_params, aux_params = load_param(pretrained, epoch, convert=True)
File “/home/ubuntu/incubator-mxnet/example/rcnn/rcnn/utils/load_model.py”, line 66, in load_param
arg_params, aux_params = load_checkpoint(prefix, epoch)
File “/home/ubuntu/incubator-mxnet/example/rcnn/rcnn/utils/load_model.py”, line 36, in load_checkpoint
tp, name = k.split(’:’, 1)
ValueError: not enough values to unpack (expected 2, got 1)

what could be the problem here?
could you guys help me out in understanding this problem… thank you.


#2

Hi @Ram124,

You seem to have a parameter file that’s not formatted in the way expected by the function. Could you share a link to the MobileNet-0.25 parameter file, so I can take a look. Or are you able to inspect the key to check that it is in “type:name” format, as expected by this function?


#3

I have used the gluon mobilenet-0.25 param file.
I have not checked it…
I did not understand what it is exactly…
Gluon model does not support?


#4

As with all models, MobileNet-0.25 contains a number of learnable parameters (the kernels, biases, weights, etc). Someone else has trained a MobileNet-0.25 model and saved the values of all their parameters after training, so you don’t have to train your own model. You then just create a MobileNet-0.25 network, and replace all of the parameters in your model with these pre-trained parameters: no training required!

BUT the parameters file must be in a specific format, and this is what I’d like to check. Where did you get this params file from? And Gluon does support this functionality.


#5

I had done training using mobilenet-0.5 using gluon model.
I had used these commands to get the model.

import mxnet.gluon.nn as nn
import mxnet.gluon.model_zoo.vision.mobilenet as mn
mobileNet = vision.mobilenet0_5(pretrained=True, ctx=ctx)

After training i got the param file…

That param file i am trying to use it now…

But i am getting that error.


#6

I have also meet the similar problem, hope this post will help you:

Load_checkpoint ValueError: not enough values to unpack


#7

I have seen that post.
But i need to use this in RCNN example.
Do you know how to do it there?

I am using mobilenet-0.25 netowork.
I want the pretrained model for that network.
or Can i randomize the weights without using pretrained model?

since i have dataset with channel 1.

Thank You