question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: __init__() got an unexpected keyword argument 'reduction'

See original GitHub issue

Hi, When I try to run the script, I face this error , whats wrong ? TypeError: __init__() got an unexpected keyword argument 'reduction' I’m calling the script like this :

IMAGENET_DIR=ImageNet_DataSet
MODEL_NAME=mobilenet
python main.py --dataset $IMAGENET_DIR --model $MODEL_NAME 

I’m using Python3.6 and Pytorch 0.4 Thanks alot in advance

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
eladhoffercommented, Oct 21, 2018

make sure you have updated utils.pytorch (git pull) and latest pytorch (>0.4.1)

1reaction
blueardourcommented, Jan 31, 2019

After a check, the ‘recurse’ doesn’t exist in the pytorch 0.4.1 version. def named_parameters(self, memo=None, prefix=''): cited from https://github.com/pytorch/pytorch/blob/v0.4.1/torch/nn/modules/module.py

and it does in the v1.0 version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Loading Custom Model with Tensorflow 2.1 - Stack Overflow
... time I go to load the saved model I get the same error message: TypeError: __init__() got an unexpected keyword argument 'reduction'...
Read more >
__init__() got an unexpected keyword argument 'reduction ...
Current behavior. Compile a model with metrics=[tf.keras.losses.XXX] does not raise error. The training process seems also good. However, if we save the model ......
Read more >
TypeError: __init__() got an unexpected keyword argument ...
I am loading pre-trained character embedding to OpenNMT-py framework so that to perform character based translation.
Read more >
Cant properly load saved model and call predict method
hi, I am having trouble loading large model after saving. have tried ... error: __init__() got an unexpected keyword argument 'reduction'.
Read more >
Flask got an unexpected keyword argument path
8', TypeError: init() got an unexpected keyword argument 'websocket'` if try to ... there is no reduction parameter, but there is an official...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found