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

Getting error TypeError: buffer is too small for requested array with Memory Warning, while converting into H5 #170

Open
vasanthhr opened this issue Jul 14, 2019 · 1 comment

Comments

@vasanthhr
Copy link

Hello ALL,

I tried to convert this weights and cfg files. And Even I tried to use new cfg files as mentioned in https://github.com/pjreddie/darknet/tree/master/cfg . But no success and still getting the same error as mentioned below.

Used the below command for conversion:

./yad2k.py face_config.cfg tiny-yolo-azface-fddb_82000.weights model_data/f-y2-t.h5

Getting below error:

Parsing section convolutional_4
conv2d bn leaky (3, 3, 128, 256)
Parsing section maxpool_4
Parsing section convolutional_5
conv2d bn leaky (3, 3, 256, 512)
Parsing section maxpool_5
Parsing section convolutional_6
conv2d bn leaky (3, 3, 512, 1024)
2019-07-14 15:00:28.017644: W tensorflow/core/framework/allocator.cc:107] Allocation of 18874368 exceeds 10% of system memory.
2019-07-14 15:00:28.271043: W tensorflow/core/framework/allocator.cc:107] Allocation of 18874368 exceeds 10% of system memory.
2019-07-14 15:00:28.305239: W tensorflow/core/framework/allocator.cc:107] Allocation of 18874368 exceeds 10% of system memory.
Parsing section convolutional_7
conv2d bn leaky (3, 3, 1024, 1024)
2019-07-14 15:00:29.538725: W tensorflow/core/framework/allocator.cc:107] Allocation of 37748736 exceeds 10% of system memory.
2019-07-14 15:00:30.050551: W tensorflow/core/framework/allocator.cc:107] Allocation of 37748736 exceeds 10% of system memory.
Parsing section convolutional_8
conv2d    linear (1, 1, 1024, 30)
Traceback (most recent call last):
  File "./yad2k.py", line 270, in <module>
    _main(parser.parse_args())
  File "./yad2k.py", line 156, in _main
    buffer=weights_file.read(weights_size * 4))
TypeError: buffer is too small for requested array

Originally posted by @vasanthhr in #9 (comment)

@zui-jiang
Copy link

I've just met the same problem, when i using weighs from http://pjreddie.com/media/files/yolo.weights and cfg from https://github.com/pjreddie/darknet/blob/master/cfg/yolov2.cfg. But when I using weights and cfg from the same model in https://pjreddie.com/darknet/yolo/ ,it works well. So I guess you may also use two different model's cfg and weights.

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