seuretm / printed-vs-handwritten

Apache License 2.0
20 stars 8 forks source link

Dataset/ Network #1

Open DecentMakeover opened 4 years ago

DecentMakeover commented 4 years ago

Thanks for sharing your work.

Hi, will you be sharing the dataset and the model.?

Thanks in advance.

DecentMakeover commented 4 years ago

Also facing this error AttributeError: 'AvgPool2d' object has no attribute 'divisor_override'

Would you mind sharing what pytorch version you are using?

Thanks

subhadeepkaran commented 4 years ago

@DecentMakeover had to do try and test method to figure out that it works for pip install torch==1.1.0 torchvision==0.3

subhadeepkaran commented 4 years ago

@DecentMakeover model has been shared, so probably the issue can be closed I believe

erdorath commented 2 years ago

I know this is old, But in case someone stumbles upon this (and doesn't want to use that old pytorch version, in my case to leverage CUDA 11 support), a quick fix is to delete the last argument on the function forward on line 617 of pooling.py, on the torch installation package path(in my case: C:\Users\User\miniconda3\Lib\site-packages\torch\nn\modules\pooling.py):

def forward(self, input: Tensor) -> Tensor:
        return F.avg_pool2d(input, self.kernel_size, self.stride,
                            self.padding, self.ceil_mode, self.count_include_pad)#, self.divisor_override)

That fixes the error and makes the code work so much faster