# Given groups=1, weight\[16, 1, 5, 5\], so expected input\[100, 3, 64, 64\] to have 1 channels, but got 3 channels instead

**URL:** <https://discuss.pytorch.org/t/given-groups-1-weight-16-1-5-5-so-expected-input-100-3-64-64-to-have-1-channels-but-got-3-channels-instead/28831>\
**Category:** vision\
**Created:** [November 5, 2018, 3:36pm UTC](https://discuss.pytorch.org/t/given-groups-1-weight-16-1-5-5-so-expected-input-100-3-64-64-to-have-1-channels-but-got-3-channels-instead/28831 "2018-11-05T15:36:35Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![anesh117](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@anesh117](https://discuss.pytorch.org/u/anesh117)\
**Post date:** [November 6, 2018, 1:48pm UTC](https://discuss.pytorch.org/t/given-groups-1-weight-16-1-5-5-so-expected-input-100-3-64-64-to-have-1-channels-but-got-3-channels-instead/28831/17 "2018-11-06T13:48:17Z")

</div>

Actually while converting jpg format to gray scale we have to use img.convert(‘LA’) instead of img.convert(‘L’).  
I read that while reading gray scale image in opencv it gives us 3 layers of gray scale. I tried PNG format still its showing the same error.

---

_[View the full topic](https://discuss.pytorch.org/t/given-groups-1-weight-16-1-5-5-so-expected-input-100-3-64-64-to-have-1-channels-but-got-3-channels-instead/28831)._
