# Show_results with bs=1 give 'too many indices for array' error

When I use CycleGan from coursev3 with my own dataset (5k images for each class),
show_results works with bs=4 but not with bs=1
I can fit a model without error but can’t use show_results afterward.

I got this error while showing results.
`learn.show_results(ds_type=DatasetType.Train)`

My data loading is the same except not transforming as all my images are 256,256 size and I use bs = 1

``````data = None
data = (ImageTupleList.from_folders(path, 'trainA', 'trainB')
.split_none()
.label_empty()
.transform(get_transforms())
.databunch(bs=1))
``````

And show_xyzs function:

`````` def show_xyzs(self, xs, ys, zs, figsize:Tuple[int,int]=None, **kwargs):
"""Show `xs` (inputs), `ys` (targets) and `zs` (predictions) on a figure of `figsize`.
`kwargs` are passed to the show method."""
figsize = ifnone(figsize, (12,3*len(xs)))
fig,axs = plt.subplots(len(xs), 2, figsize=figsize)
fig.suptitle('Ground truth / Predictions', weight='bold', size=14)
for i,(x,z) in enumerate(zip(xs,zs)):
x.to_one().show(ax=axs[i,0], **kwargs)
z.to_one().show(ax=axs[i,1], **kwargs)``````
1 Like

I have a similar error “too many indices for array”

any idea?

Can it be the` .view(-1)` method in Pytorch that we should us?

I checked the Size with .size function and then assign that array and it works, but not sure why it shows in this way. like only 3 “columns”.

Probably because it is a .jpg and not .png
{"ft_lang_label":"__label__en","ft_lang_prob":0.52630395,"math_prob":0.95869166,"size":1040,"snap":"2020-10-2020-16","text_gpt3_token_len":299,"char_repetition_ratio":0.1023166,"word_repetition_ratio":0.0,"special_character_ratio":0.30096152,"punctuation_ratio":0.21100917,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9748979,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-03-28T09:56:04Z\",\"WARC-Record-ID\":\"<urn:uuid:d115e2cf-ddfa-4cad-8f2d-b6ff481c6bef>\",\"Content-Length\":\"19272\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:28370fc0-7851-46a7-a7df-b5559884904d>\",\"WARC-Concurrent-To\":\"<urn:uuid:4b987d8d-38eb-4b03-b383-9f5d2f84983c>\",\"WARC-IP-Address\":\"107.170.249.202\",\"WARC-Target-URI\":\"https://forums.fast.ai/t/show-results-with-bs-1-give-too-many-indices-for-array-error/63768\",\"WARC-Payload-Digest\":\"sha1:G5724FNPELJFJ2IYNRFLIORCA3G55ANA\",\"WARC-Block-Digest\":\"sha1:ZKRBLFZFQWODYAUO3CTFKV2AXUBPGT7U\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370490497.6_warc_CC-MAIN-20200328074047-20200328104047-00210.warc.gz\"}"}