Skip to content

How to call MnistDataSet.read_data_sets #1138

Answered by Wanglongzhi2001
pocky6 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, the following is a minimal example of training using the Mnist dataset , I hope it will help you.

var input = keras.Input((784));
var x = keras.layers.Reshape((28, 28)).Apply(input);
x = keras.layers.LSTM(50, return_sequences: true).Apply(x);
x = keras.layers.LSTM(100).Apply(x);
var output = keras.layers.Dense(10, activation: "softmax").Apply(x);
var model = keras.Model(input, output);
model.summary();
model.compile(keras.optimizers.Adam(), keras.losses.CategoricalCrossentropy(), new string[] { "accuracy" });
var data_loader = new

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@pocky6
Comment options

Answer selected by pocky6
Comment options

You must be logged in to vote
3 replies
@pocky6
Comment options

@pocky6
Comment options

@pocky6
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants