cbergmeir / RSNNS

RSNNS: Neural Networks in R using the Stuttgart Neural Network Simulator (SNNS)
26 stars 5 forks source link

How to show the values of hidden nodes in a mlp model #21

Closed AdDenissen closed 4 years ago

AdDenissen commented 4 years ago

Dear developer,

How can I predict the value of hidden nodes in a mlp model?

For keras I can short the model upto a layer call 'dense_1' and make my predictions on 'ph.test': layer_name <- 'dense_1'; chk_model <- keras_model(inputs=model$input, outputs=get_layer(model, layer_name)$output); chko <- predict(chk_model, ph.test);

Thanks in advance,

Ad Denissen.

cbergmeir commented 4 years ago

Hi, in RSNNS, though it is possible, regretfully I don't think there is an easy way to do it. A good starting point will be demo/mlp_irisSnnsR.R . You have essentially three options.

AdDenissen commented 4 years ago

Hi,

Thanks for the tips. I used examples from SnnsR_extractNetInfo.R to fix the problem.

I can nicely observe the network activity based in the inputs.

Ad Denissen Principal System Architect Philips Research Brain, Behaviour & Cognition High Tech Campus 34 3.014 5656 AE Eindhoven GSM. +31-6226-77777


From: cbergmeir notifications@github.com Sent: Monday, July 13, 2020 05:23 To: cbergmeir/RSNNS RSNNS@noreply.github.com Cc: Denissen, Ad ad.denissen@philips.com; Author author@noreply.github.com Subject: Re: [cbergmeir/RSNNS] How to show the values of hidden nodes in a mlp model (#21)

Hi, in RSNNS, though it is possible, regretfully I don't think there is an easy way to do it. A good starting point will be demo/mlp_irisSnnsR.R . You have essentially three options.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcbergmeir%2FRSNNS%2Fissues%2F21%23issuecomment-657338036&data=02%7C01%7C%7C5256588d14e94681004d08d826dc2ecd%7C1a407a2d76754d178692b3ac285306e4%7C0%7C1%7C637302074403721753&sdata=zeXpBCbdKhy0gl3D6oLDeC4YFiEsVjS9vsVacY0b2aA%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADSJSBXNTA6BZ2KWJTDP7KLR3J445ANCNFSM4NTNRK3A&data=02%7C01%7C%7C5256588d14e94681004d08d826dc2ecd%7C1a407a2d76754d178692b3ac285306e4%7C0%7C1%7C637302074403721753&sdata=YwCPHBnnKf05moIEM6O%2Ffh%2BtxqRLropvtDEAwiXJXC8%3D&reserved=0.


The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

cbergmeir commented 4 years ago

Hi,

I'm glad to hear you could get it to work.

Regards, Christoph