You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/04/29 19:57:53 UTC
[GitHub] [tvm] trevor-m opened a new pull request #7949: [Frontend][Keras] Support nested layers recursively in keras frontend
trevor-m opened a new pull request #7949:
URL: https://github.com/apache/tvm/pull/7949
Keras models can have nested layers, where one layer in the model is actually another Keras model with it's own layers. With this PR, we will now support these types of models in TVM.
Example Keras model with nested model "mobilenetv2_1.00_224".
```
Layer (type) Output Shape Param #
=================================================================
mobilenetv2_1.00_224 (Functi (None, 7, 7, 1280) 2257984
_________________________________________________________________
global_average_pooling2d_1 ( (None, 1280) 0
_________________________________________________________________
dense_2 (Dense) (None, 1024) 1311744
_________________________________________________________________
dense_3 (Dense) (None, 2) 2050
=================================================================
Total params: 3,571,778
Trainable params: 3,537,666
Non-trainable params: 34,112
_________________________________________________________________
```
It can be created using the following Keras code, which is commonly used when using pretained models.
```
sub_model = keras.applications.MobileNetV2(input_shape=(224, 224, 3), include_top=False)
keras_model = keras.Sequential(
[
sub_model,
keras.layers.GlobalAveragePooling2D(),
keras.layers.Dense(1024),
keras.layers.Dense(2),
]
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] trevor-m commented on pull request #7949: [Frontend][Keras] Support nested layers recursively in keras frontend
Posted by GitBox <gi...@apache.org>.
trevor-m commented on pull request #7949:
URL: https://github.com/apache/tvm/pull/7949#issuecomment-832781097
Thanks for reviewing @mbrookhart @leandron !
Tests are passing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] trevor-m commented on pull request #7949: [Frontend][Keras] Support nested layers recursively in keras frontend
Posted by GitBox <gi...@apache.org>.
trevor-m commented on pull request #7949:
URL: https://github.com/apache/tvm/pull/7949#issuecomment-831559721
@siju-samuel @jwfromm @mbrookhart @leandron Could you please review?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] mbrookhart commented on pull request #7949: [Frontend][Keras] Support nested layers recursively in keras frontend
Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #7949:
URL: https://github.com/apache/tvm/pull/7949#issuecomment-833697409
Thanks @trevor-m @leandron
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] mbrookhart merged pull request #7949: [Frontend][Keras] Support nested layers recursively in keras frontend
Posted by GitBox <gi...@apache.org>.
mbrookhart merged pull request #7949:
URL: https://github.com/apache/tvm/pull/7949
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org