# Why do I get Resize is not callable?

**URL:** <https://discuss.pytorch.org/t/why-do-i-get-resize-is-not-callable/53533>\
**Category:** Uncategorized\
**Created:** [August 16, 2019, 8:42am UTC](https://discuss.pytorch.org/t/why-do-i-get-resize-is-not-callable/53533 "2019-08-16T08:42:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Shisho\_Sama](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/shisho_sama/32/6926_2.png) [@Shisho\_Sama](https://discuss.pytorch.org/u/Shisho_Sama)\
**Post date:** [August 16, 2019, 8:42am UTC](https://discuss.pytorch.org/t/why-do-i-get-resize-is-not-callable/53533/1 "2019-08-16T08:42:52Z")

</div>

I’m trying to create my own funcor for use in transformations, but it keeps failing with the error :  
` **TypeError** : 'Resize' object is not callable`  
This my example :

```auto
import torchvision.transforms.functional as F
class Resize(object):
    def __init__ (self, size, interpolation):
        self.size = size
        self.interpolation = interpolation

    def __cal__ (self, input):
        return F.resize(input, self.size, self.interpolation)

to_tensor_f = ToTensor()
import PIL.Image as Image
resize_f = Resize(3, Image.BILINEAR)
numpy_tensor = np.random.rand(2, 3)
result_tensor = to_tensor_f(numpy_tensor)
print(result_tensor)
#resize this tensor!
x=resize_f(result_tensor)
print(x)

```

Thank you all in advance

---

_[View the full topic](https://discuss.pytorch.org/t/why-do-i-get-resize-is-not-callable/53533)._
