Porting Network from Keras to Matlab
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Sivylla Paraskevopoulou
am 27 Apr. 2022
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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!