Skip to content

Fixed use of model.load instances in letter_recog.py - #13175

Merged
alalek merged 1 commit into
opencv:3.4from
paddy74:patch-1
Nov 15, 2018
Merged

alalek merged 1 commit into
opencv:3.4from
paddy74:patch-1

Conversation

@paddy74

@paddy74 paddy74 commented Nov 15, 2018

Copy link
Copy Markdown

The load() function returns a new object, and as such does not use the one it is called on. This commit updates the uses of model.load in this program so it will work as intended and not throw an error.

This pullrequest changes

Fixed use of model.load instances in letter_recog.py

The load() function returns a new object, and as such does not use the one it is called on.
This commit updates the uses of model.load in this program so it will work as intended and not throw an error.

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased onto 3.4 branch

Comment thread samples/python/letter_recog.py Outdated
fn = args['--load']
print('loading model from %s ...' % fn)
model.load(fn)
model = model.load(fn)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not correct. Reverted.

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution!

@alalek
alalek merged commit 33e824f into opencv:3.4 Nov 15, 2018
@paddy74
paddy74 deleted the patch-1 branch November 16, 2018 20:52
@alalek alalek mentioned this pull request Nov 17, 2018
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants