Skip to content

REGION op removed from topi and added in darkent frontend - #2275

Merged
tqchen merged 3 commits into
apache:masterfrom
siju-samuel:remove_region
Feb 27, 2019
Merged

tqchen merged 3 commits into
apache:masterfrom
siju-samuel:remove_region

Conversation

@siju-samuel

Copy link
Copy Markdown
Member

The region op is used only in darknet and since its not generic and can be acheived by frontend itself, i implemented the op in darknet.py and removed all the existing region_op registration, testcases and topi code.
This will be helpful when migrating to relay as from relay, region op is not added.

Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers.

@tqchen

tqchen commented Dec 14, 2018

Copy link
Copy Markdown
Member

please request reviews

@jroesch

jroesch commented Jan 5, 2019

Copy link
Copy Markdown
Member

What is the status on this PR?

@tqchen

tqchen commented Jan 8, 2019

Copy link
Copy Markdown
Member

@siju-samuel please rebase the PR against the latest master

@siju-samuel

Copy link
Copy Markdown
Member Author

@srkreddy1238 @PariksheetPinjari909 please review

Comment thread nnvm/python/nnvm/frontend/darknet.py Outdated
data_block_1 = splits[:offset]
splits = data_block_1 + [softmax_output]
concat_out = _sym.concatenate(*splits, axis=2)
return _sym.reshape(concat_out, shape=input_shape), None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Split the data block at (2, 4, 5) locations and apply sigmoid and softmax as follows:

    data_block = _sym.reshape(inputs[0], shape=intermediate_shape)
    split_indices = (2, 4, 5)
    split_res = _sym.split(data_block, indices_or_sections=split_indices, axis=2)
    split_res0 = _sym.sigmoid(split_res[0])
    if not background:
        split_res2 = _sym.sigmoid(split_res[2])
    else:
        split_res2 = split_res[2]
    if softmax:
        split_res3 = _sym.softmax(split_res[3], axis=2)
    concat_list = [split_res0, split_res[1], split_res2, split_res3]
    out = _sym.concatenate(*concat_list, axis=2)
    return _sym.reshape(out, shape=input_shape), None

@tqchen tqchen added status: need update need update based on feedbacks and removed status: need review labels Jan 17, 2019
@tqchen

tqchen commented Jan 18, 2019

Copy link
Copy Markdown
Member

@siju-samuel please act on the comments

@siju-samuel siju-samuel mentioned this pull request Feb 26, 2019
8 tasks done
@tqchen
tqchen merged commit 0edb332 into apache:master Feb 27, 2019
@tqchen tqchen added status: accepted and removed status: need update need update based on feedbacks labels Feb 27, 2019
@yzhliu yzhliu mentioned this pull request Mar 2, 2019
9 of 28 tasks
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 9, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 12, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 12, 2019
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.

4 participants