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
Added export functionality for Keras #85
Conversation
utsavgarg
commented
Jun 26, 2017
- Added functions to calculate output shapes for Keras export
- Added Data, Conv, Pool, Activation, Dense, Flatten, Dropout layers
- Tested export of VGG-16
* Added Conv, Input, Pooling, Activation, Dropout and Dense layers * Tested export of VGG-16
* Added support for BatchNorm and Eltwise layers
* Added concat layer * Fixed bug with zero padding layer
* Added Reshape and Deconv layers
* Added support for LSTM, SimpleRNN layers * Added documentation in __init__.py
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.
Looks great overall, good job! Please look at comments. Can we rename layers.py (from the earlier PR) to import_layers.py or something? Can we also test a couple more simple NN's (both import and export) and add to examples? That can be a new PR.
@@ -27760,7 +27760,7 @@ | |||
delete netData[layerId].state; | |||
}); |
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.
Gitignore?
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.
Not sure what you meant here
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.
I meant we should add bundle.js to gitignore.
elif(net[layerId]['info']['type'] == 'Reshape'): | ||
net[layerId]['shape']['output'] = reshape(net[layerId]) | ||
|
||
elif(net[layerId]['info']['type'] in ['SPP', 'Crop']): |
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.
We should throw a "This layer is not supported in Keras" error on the front end for this.
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.
Okay will add exception handling.
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.
Sounds good.
params['kernel_w'], params['kernel_h'] = layer.kernel_size | ||
params['stride_w'], params['stride_h'] = layer.strides | ||
params['pad_w'], params['pad_h'] = get_padding(params['kernel_w'], params['kernel_h'], | ||
params['kernel_h'], params['kernel_w'] = layer.kernel_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.
Was this a mistake in the earlier PR?
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
The |
Great, please add everything that you've tested to the examples folder. Would be good to make subfolders for each framework. |
LGTM |