OpenNMT-py
OpenNMT-py copied to clipboard
ImageEncoder.from_opt uses deprecated opt.brnn
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
Looks good to me. PR is welcome!