This example shows how to import the layers from a pretrained Keras network, replace the unsupported layers with custom layers, and assemble the layers into a network ready for prediction.
Import Keras Network
Import the layers from a Keras network model. The network in'digitsDAGnetwithnoise.h5'classifies images of digits.
'姓名'- 重新连接larrayusing the input and output names of the replaced layer. For each layer connected to an input of the replaced layer, reconnect the layer to the input of the same input name oflarray(1)。对于连接到替换层输出的每个图层,将图层重新连接到同一输出名称的输出名称larray(end)。
'命令'- 重新连接larrayusing the order of the input names oflarray(1)以及输出名称larray(end)。Reconnect the layer connected to theith input of the replaced layer to theith input oflarray(1)。Reconnect the layer connected to thej替换层的输出到jth output oflarray(end)。
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.