Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 27, 2019

Conversation

siju-samuel
Copy link
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
Copy link
Member

tqchen commented Dec 14, 2018

please request reviews

@jroesch
Copy link
Member

jroesch commented Jan 5, 2019

What is the status on this PR?

@tqchen
Copy link
Member

tqchen commented Jan 8, 2019

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

@siju-samuel
Copy link
Member Author

@srkreddy1238 @PariksheetPinjari909 please review

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
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
Copy link
Member

tqchen commented Jan 18, 2019

@siju-samuel please act on the comments

@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
28 tasks
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