OpenNMT-py icon indicating copy to clipboard operation
OpenNMT-py copied to clipboard

ImageEncoder.from_opt uses deprecated opt.brnn

Open addisonklinke opened this issue 4 years ago • 1 comments

The from_opt() method of ImageEncoder uses opt.brnn on line 63 which is deprecated according to opts.py. This means in the im2text example, the encoder will be unidirectional even though the --encoder_type brnn option is passed

To fix, I believe we should change onmt/encoders/image_encoder:63 to

opt.encoder_type == 'brnn',  # Constructor expects a boolean

I would be happy to submit a PR if this is indeed the appropriate remedy

addisonklinke avatar Jan 16 '20 16:01 addisonklinke

Looks good to me. PR is welcome!

francoishernandez avatar Jan 16 '20 16:01 francoishernandez