Skip to content

[DARKNET]RNN Support for darknet - #1443

Merged
tqchen merged 3 commits into
apache:masterfrom
siju-samuel:darknet_rnn
Jul 19, 2018
Merged

[DARKNET]RNN Support for darknet#1443
tqchen merged 3 commits into
apache:masterfrom
siju-samuel:darknet_rnn

Conversation

@siju-samuel

Copy link
Copy Markdown
Member

RNN Support for DARKNET frontend is added.
This PR consists of

  • Darknet frontend framework changed to Class, similar to onnx/tensorflow for better maintainability.
  • RNN layer processing of darknet.
  • RNN Tutorial how to run RNN
  • Testcase to check RNN layer output

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 others in the community.

@siju-samuel

Copy link
Copy Markdown
MemberAuthor

@PariksheetPinjari909 , @srkreddy1238@Huyuwei@masahi
Please help to review this PR


target = 'llvm'
shape_dict = {'data': data.shape}
#with nnvm.compiler.build_config(opt_level=2):

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.

remove the commented line if not required.

shape_dict = {'data': data.shape}
#with nnvm.compiler.build_config(opt_level=2):
graph, library, params = nnvm.compiler.build(sym, target, shape_dict, dtype, params=params)
######################################################################

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.

Correct the comment styles.

######################################################################
# Prepare cfg and weights file
# Pretrained model available
# --------------------------------------------------------------------

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.

Doc style corrections.


CFG_NAME = MODEL_NAME + '.cfg'
WEIGHTS_NAME = MODEL_NAME + '.weights'
CFG_URL = 'https://github.com/siju-samuel/darknet/blob/master/cfg/' + \

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.

may use dmlc/web-data instead


######################################################################
# Compile the model on NNVM
# --------------------------------------------------------------------

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.

doc style corrections

@siju-samuel

Copy link
Copy Markdown
MemberAuthor

@srkreddy1238 Thanks for the comments. All comments are addressed. Please check again. TIA

CFG_URL = REPO_URL + 'cfg/' + CFG_NAME + '?raw=true'
WEIGHTS_URL = REPO_URL + 'weights/' + WEIGHTS_NAME + '?raw=true'

def _dl_progress(count, block_size, total_size):

@srkreddy1238srkreddy1238Jul 18, 2018

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.

Tutorial scripts gets exported to docs.tvm.ai (Ex: https://docs.tvm.ai/tutorials/nnvm/get_started.html) .

Hence suggest to simplify the example by using existing methods.
Here we could use glueon download methods instead of rewriting.

with nnvm.compiler.build_config(opt_level=2):
graph, lib, params = nnvm.compiler.build(sym, target, shape_dict, dtype_dict, params)

# Save the json

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.

Saving lib already explained in get_started.py. Can leave a doc pointer instead.

@srkreddy1238

Copy link
Copy Markdown
Contributor

@siju-samuel with above comments LGTM.

@srkreddy1238srkreddy1238 left a comment

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.

@siju-samuel thanks. good to go now.

@siju-samuel

Copy link
Copy Markdown
MemberAuthor

@srkreddy1238 Thanks for the review.
@tqchen Please help to merge dmlc/web-data#96, This PR the trained models for the example.

@PariksheetPinjari909PariksheetPinjari909 left a comment

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.

LGTM

@tqchen
tqchen merged commit bf6d244 into apache:masterJul 19, 2018
@tqchen

Copy link
Copy Markdown
Member

Thanks @siju-samuel@srkreddy1238@PariksheetPinjari909 , this is now merged

tqchen pushed a commit to tqchen/tvm that referenced this pull request Aug 4, 2018
sergei-mironov pushed a commit to sergei-mironov/tvm that referenced this pull request Aug 8, 2018
Sign up for freeto 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

@siju-samuel@srkreddy1238@tqchen@PariksheetPinjari909