Skip to content

when using train.py, getting error TypeError: __init__() got an unexpected keyword argument 'dct_method' #3476

@MicrocontrollersAndMore

Description

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:

error1

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:

file_change

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:

change

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions