-
Notifications
You must be signed in to change notification settings - Fork 0
DRAFT: MAS (Model Analyze Script) #75
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
base: master
Are you sure you want to change the base?
Conversation
723e003 to
593fbc0
Compare
| assert operator.OutputsLength() == 1 | ||
| ofm_idx = operator.Outputs(0) | ||
|
|
||
| # Q. Is it possible to enumerate defined fields in conv2d_options? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is possible (with minor hack). See mas.
|
|
||
| class OperationTranslatorRegistry: | ||
| def __init__(self): | ||
| # Let's port this part to user-level scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the key difference between rfl-model-analyze and mas.
| out = tf.transpose(inp) | ||
|
|
||
| tfgex_set_inputs(inp) | ||
| tfgex_set_outputs(out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It it a bit interesting that a .tflite built from this .tfgex file does not have TransposeOptions... ``)
593fbc0 to
33930de
Compare
967f720 to
9ec4931
Compare
| rules['CONV_2D'] = conv2d | ||
| rules['DEPTHWISE_CONV_2D'] = dconv2d_ref | ||
| rules['FULLY_CONNECTED'] = fully_connected | ||
| rules['LEAKY_RELU'] = unimplemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ScalarField('AsymmetricQuantizeInputs'), | ||
| ] | ||
| opschema['LEAKY_RELU'] = [ | ||
| ScalarField('Alpha'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
70c12c1 to
99f1509
Compare
| return self.id.src == ModelInput | ||
|
|
||
| def is_model_const(self): | ||
| return self.id.src == ModelConst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| wgt_size += mas.model.value(wgt_value_id).byte_size | ||
|
|
||
| info(f'Effetive weight size is {wgt_size} bytes') | ||
| mas.set_attr('basic.wsize', wgt_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b9c0ce7 to
8b094b1
Compare
8b094b1 to
fb39b1f
Compare
6dbc189 to
0843655
Compare
3c8f46b to
f1268a8
Compare
Let's design and implement a NN model characteristics analysis toolkit. [ci skip] Signed-off-by: Jonghyun Park <parjong@gmail.com>
f1268a8 to
b59bd70
Compare
Let's design and implement a NN model characteristics analysis toolkit.
Signed-off-by: Jonghyun Park parjong@gmail.com