Computed gradients for a keras model in MATLAB

1 次查看(过去 30 天)
MATLAB via NN Toolbox now supports directly importing and working with keras models. Is it possible to compute gradients w.r.to input/output of any layer, similar to keras backend function K.gradients() ?

回答(1 个)

Don Mathis
Don Mathis 2018-6-26
If you're referring to the Tensorflow-Keras Importer support package, that imports a Keras model into MATLAB and returns a MATLAB (Neural Network Toolbox) model. The Keras model is not retained; it is translated into a MATLAB model, so you can only perform operations defined on MATLAB models from that point onward.
  1 个评论
James Walt
James Walt 2018-6-26
@Don Mathis Thanks for a response, and clarification. Sorry but I still don’t have the full answer since I am new to MATLAB. I saw documentation which mentions defaultderiv() can be used to compute gradients but I am not sure how to use it to compute say dy_i/dx_ik where y_i is the ith target class/node and x_ik is the ith input/feature map at layer k.
Thanks

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by