필터 지우기
필터 지우기

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 CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by