Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pra-dan opened this issue Mar 18, 2020 · 1 comment
Open

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

pra-dan opened this issue Mar 18, 2020 · 1 comment

Comments

@pra-dan
Copy link

pra-dan commented Mar 18, 2020

I am converting YOLO v2-tiny model to TensorFlow.
I downloaded the weights from the official site and saved them to the data/ directory.
After running
!python3 main.py \ --cfg 'data/yolov2.cfg' \ --weights 'data/yolov2.weights' \ --output 'data/' \ --prefix 'yolov2/' \ --gpu 0
I mistakenly renamed the yolov2-tiny files to yolov2 files, hence the paths to cfg and weights may seem wrong

But this is what I get:

WARNING:tensorflow:From main.py:56: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.

Traceback (most recent call last):
  File "main.py", line 116, in <module>
    main(args)
  File "main.py", line 57, in main
    parse_net(args.layers, args.cfg, args.weights, args.training)
  File "main.py", line 25, in parse_net
    for ith, layer in enumerate(cfg_walker):
  File "/content/DW2TF/util/reader.py", line 94, in get_block
    key, value = line[0:2]
ValueError: not enough values to unpack (expected 2, got 1)
@pratayusha
Copy link

Hi pra-dan ,
I had a similar problem because I was using incorrect cfg file.

Use below command,
wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov2.cfg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants