# check failed : shift.count == 0 || shift.count == weightCount

**URL:** <https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174>\
**Category:** Jetson TX1\
**Created:** [November 14, 2017, 3:29am UTC](https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174 "2017-11-14T03:29:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![2013302477](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@2013302477](https://forums.developer.nvidia.com/u/2013302477)\
**Post date:** [November 14, 2017, 3:29am UTC](https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174/1 "2017-11-14T03:29:57Z")

</div>

Hi,

I try to accelerate a caffe model trained by myself using tensorRT2. And there is a error in a BatchNorm layer:

Parameter check failed at: Network.cpp::addScale::118, condition: shift.count == 0 || shift.count == weightCount  
error parsing layer type BatchNorm index 44

Is there some problem with my model parameter?

Thanks!

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [November 14, 2017, 6:36am UTC](https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174/2 "2017-11-14T06:36:07Z")

</div>

Hi,

It looks like that there was something wrong with your weight file when TensorRT parsing the batch norm layer.  
Which Caffe version do you use? Do you use the FP16 mode?

Thanks.

---

<div class="post-metadata">

**Author:** ![2013302477](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@2013302477](https://forums.developer.nvidia.com/u/2013302477)\
**Post date:** [November 14, 2017, 9:20am UTC](https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174/3 "2017-11-14T09:20:32Z")

</div>

Hi,

It’s a model based on SSD. And I modify the sampleFasterRCNN when I meet the error. I think it’s the FP16 mode.

Thanks.

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [November 16, 2017, 3:03am UTC](https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174/4 "2017-11-16T03:03:36Z")

</div>

Hi,

Not sure which SSD model do you use. Could you share more information with us?

More, could you help us check following commands?

```auto
$ ./giexec --deploy=[prototxt] --output=[output blob]
$ ./giexec --deploy=[prototxt] --model=[caffemodel] --output=[output blob]

```

Thanks.

---

<div class="post-metadata">

**Author:** ![2013302477](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@2013302477](https://forums.developer.nvidia.com/u/2013302477)\
**Post date:** [November 19, 2017, 3:06pm UTC](https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174/5 "2017-11-19T15:06:35Z")

</div>

Hi,

I have solved this problem. There are some problems with a parameter “num\_output” in a convolution layer.

Thanks.

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 18, 2021, 6:58pm UTC](https://forums.developer.nvidia.com/t/check-failed-shift-count-0-shift-count-weightcount/55174/6 "2021-10-18T18:58:38Z")

</div>

Closed on October 18, 2021, 6:58pm UTC


