# Customized collate\_fn gives False pin\_memory in the official example

**URL:** <https://discuss.pytorch.org/t/customized-collate-fn-gives-false-pin-memory-in-the-official-example/44964>\
**Category:** Uncategorized\
**Created:** [May 11, 2019, 7:47am UTC](https://discuss.pytorch.org/t/customized-collate-fn-gives-false-pin-memory-in-the-official-example/44964 "2019-05-11T07:47:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexisW](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/a/7993a0/32.png) [@AlexisW](https://discuss.pytorch.org/u/AlexisW)\
**Post date:** [May 11, 2019, 7:47am UTC](https://discuss.pytorch.org/t/customized-collate-fn-gives-false-pin-memory-in-the-official-example/44964/1 "2019-05-11T07:47:34Z")

</div>

> <https://github.com/pytorch/pytorch/blob/master/torch/utils/data/dataloader.py#L112>

Running this piece of code gives me

False  
False  
False  
False  
False  
False  
False  
False  
False  
False

Is that normal?

---

<div class="post-metadata">

**Author:** ![SimonW](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/simonw/32/1702_2.png) [@SimonW](https://discuss.pytorch.org/u/SimonW)\
**Post date:** [May 11, 2019, 10:14pm UTC](https://discuss.pytorch.org/t/customized-collate-fn-gives-false-pin-memory-in-the-official-example/44964/2 "2019-05-11T22:14:40Z")

</div>

it’s normal if you are using old pytorch or does not have cuda
