Jack Z
Jack Z

Reputation: 500

access trained parameter in CNTK

With a model like this, how can one access the trained parameters like weight and bias of each layer?

model = Sequential ([
                Dense(xx, activation=cntk.sigmoid),
                Dense(outputs)])
z = model(features)

Thanks.

Upvotes: 1

Views: 538

Answers (1)

Sayan Pathak
Sayan Pathak

Reputation: 870

The specific mechanisms are shown in this tutorial. Here is the sample that shows how to access the parameters:

model = create_model()

print(len(model.layers))

print(model.layers[0].E.shape)

print(model.layers[2].b.value)

Upvotes: 2

Related Questions