question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extreme memory usage and bug with FP16 and darkflow_utils

See original GitHub issue

When using YOLOv2 COCO or VOC on tensornets (TF 1.7, CPU, Win 10) the memory usage with the input as tf.float32 is massive (3GB +) which is more than twice what darkflow uses for the same model. Not quite sure why.

When trying to use tf.float16 with YOLOv2, memory usage is significantly reduced (could be due to a bug that so little memory is used actually…), but there seems to be a problem with the Cython utils ported from darkflow handling the FP16 output data.

I get the following error:

Traceback (most recent call last): File “blah\src\test.py”, line 15, in <module> boxes = model.get_boxes(preds, img.shape[1:3]) File “C:\Users\abags\AppData\Local\Programs\Python\Python36\lib\site-packages\tensornets\references\yolos.py”, line 189, in _get_boxes return get_v2_boxes(opts(‘yolov2’), *args, **kwargs) File “C:\Users\abags\AppData\Local\Programs\Python\Python36\lib\site-packages\tensornets\references\yolo_utils.py”, line 94, in get_v2_boxes results = yolov2_box(opts, outs[0].copy()) File “tensornets\references\darkflow_utils\get_boxes.pyx”, line 108, in tensornets.references.darkflow_utils.get_boxes.yolov2_box ValueError: Does not understand character buffer dtype format string (‘e’)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
taehoonleecommented, May 1, 2018

OK, @abagshaw. I am going to investigate Python 3.6.

0reactions
abagshawcommented, May 10, 2018

@taehoonlee Thanks so much for all that work. Yes, I suppose this must be a Windows problem - oh well 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpectedly high fp16 memory usage · Issue #191 - GitHub
I've been noticing that using fp16 has not resulted in much difference in model size or memory usage. Using the below script (taken...
Read more >
Memory and speed - Hugging Face
We present some techniques and ideas to optimize Diffusers inference for memory or speed. As a general rule, we recommend the use of...
Read more >
Train With Mixed Precision - NVIDIA Documentation Center
Half precision (also known as FP16) data compared to higher precision FP32 vs FP64 reduces memory usage of the neural network, ...
Read more >
CSCvx93793 - CSR1000v/C8000v - High memory ... - Cisco Bug
New DDTS Symptom: High memory usage on CSR or C8000v Warning message in syslog will appear like this: "%PLATFORM-4-ELEMENT_WARNING: RP/0: ...
Read more >
NCC Health Check: cvm_memory_usage_check
Check that CVM or Prism Central VM memory usage is not high. Causes of failure, The RAM usage on the Controller VM or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found