when using train.py, getting error TypeError: __init__() got an unexpected keyword argument 'dct_method'
What is the top-level directory of the model you are using: I'm not sure I understand this question entirely, but the file I'm having a problem with is https://github.com/tensorflow/models/blob/master/research/object_detection/data_decoders/tf_example_decoder.py
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No, the concern exists using the stock file https://github.com/tensorflow/models/blob/master/research/object_detection/train.py
OS Platform and Distribution: Window 10
TensorFlow installed from (source or binary): binary via pip3
TensorFlow version (use command below): tensorflow (1.5.0)
Bazel version (if compiling from source): not compiling from source
CUDA/cuDNN version: using CPU
GPU model and memory: using CPU
Exact command to reproduce:
If I perform the usual pre-steps to using https://github.com/tensorflow/models/blob/master/research/object_detection/train.py , i.e. set up a pipline config file, download a model (I'm using Inception v2), and then run train.py per the examply usage on line 24 https://github.com/tensorflow/models/blob/master/research/object_detection/train.py#L24 then I get the following error:
TypeError: __init__() got an unexpected keyword argument 'dct_method'
Here is a screen shot if that helps:

This worked well using the same steps a few weeks ago, so I checked the commit history of https://github.com/tensorflow/models/blob/master/research/object_detection/data_decoders/tf_example_decoder.py and found that the dct_method=dct_method in the above screenshot was added recently:

it seems in https://github.com/tensorflow/models/blob/master/research/object_detection/data_decoders/tf_example_decoder.py this:
fields.InputDataFields.image: slim_example_decoder.Image(
image_key='image/encoded', format_key='image/format', channels=3),
was changed to:
fields.InputDataFields.image:
slim_example_decoder.Image(
image_key='image/encoded',
format_key='image/format',
channels=3,
dct_method=dct_method),
And now I'm getting the above error. If I simply remove the dct_method=dct_method and make no other changes the training process completes well, as it did before:

I did run the model on some training images after the training process was complete to verify it worked well, which it did.
Can somebody revert the above change in https://github.com/tensorflow/models/blob/master/research/object_detection/data_decoders/tf_example_decoder.py back to how it was, i.e. remove the dct_method=dct_method?
I'm getting the same problem when going through the quick start tutorial (https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_pets.md), removing the line fixes the problem for me
maxwang7 thanks for the posting, it seems it's not just me experiencing this concern. I just posted a pull request:
https://github.com/tensorflow/models/pull/3480
Hopefully one of the TensorFlowers will be able to review this soon, thanks!
@MicrocontrollersAndMore awessome, thanks for doing that. I made the same change locally and it fixed it. I'm guessing the dct_method serves some purpose though so curious if there's something we should be passing in...
@derekjchow Can you take a look?
For those stuck on getting the pet detector running, I made a few fixes in this PR: https://github.com/tensorflow/models/pull/3490 that were sufficient for getting training working. There were some notes added to the tutorial README as well.
I experience the same problem. Proposed temporary solution worked.