フィルターのクリア

Porting Network from Keras to Matlab

6 ビュー (過去 30 日間)
Hamza Yerlikaya
Hamza Yerlikaya 2019 年 11 月 18 日
回答済み: Sivylla Paraskevopoulou 2022 年 4 月 27 日
I am trying to port a simple network from python+keras to matlab. Model in question is the following,
def build_network(input_features=None):
# first we specify an input layer, with a shape == features
inputs = Input(shape=(input_features,), name="input")
x = Dense(32, activation='relu', name="hidden1")(inputs)
x = Dense(32, activation='relu', name="hidden2")(x)
x = Dense(32, activation='relu', name="hidden3")(x)
x = Dense(32, activation='relu', name="hidden4")(x)
x = Dense(16, activation='relu', name="hidden5")(x)
# for regression we will use a single neuron with linear (no) activation
prediction = Dense(1, activation='linear', name="final")(x)
model = Model(inputs=inputs, outputs=prediction)
model.compile(optimizer='adam', loss='mean_absolute_error')
return model
Looking throught the list of builtin layers [1]. What I've figured out is keras dense layer is matlab fullyConnectedLayer but i can not find a input layer that is not an lstm layer or an image layer. What would be the matlab equavelent of keras's Input layer?
[1] https://www.mathworks.com/help/deeplearning/ug/list-of-deep-learning-layers.html

回答 (1 件)

Sivylla Paraskevopoulou
Sivylla Paraskevopoulou 2022 年 4 月 27 日
The MATLAB Deep Learning Toolbox introduced featureInputLayer in R2020b. For more information on how the importTensorFlowNetwork function tranlates TensorFlow-Keras layers to MATLAB layers, see TensorFlow-Keras Layers Supported for Conversion into Built-In MATLAB Layers.

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by