question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Growing Neural Gas can't be pickled

See original GitHub issue

Hi, When I pickle GNG model, and then load it, it can’t continue training. It gives an error, connecting with edges. dill library has the same error.

~/python3.6/site-packages/neupy/algorithms/competitive/growing_neural_gas.py in train(self, input_train, summary, epochs)
    299             input_test=None, target_test=None,
    300             epochs=epochs, epsilon=None,
--> 301             summary=summary)
    302 
    303     def train_epoch(self, input_train, target_train=None):

~/python3.6/site-packages/neupy/algorithms/base.py in train(self, input_train, target_train, input_test, target_test, epochs, epsilon, summary)
    407 
    408                 try:
--> 409                     train_error = train_epoch(input_train, target_train)
    410 
    411                     if can_compute_validation_error:

~/python3.6/site-packages/neupy/algorithms/competitive/growing_neural_gas.py in train_epoch(self, input_train, target_train)
    346             for to_neuron in list(graph.edges_per_node[closest_neuron]):
    347                 edge_id = make_edge_id(to_neuron, closest_neuron)
--> 348                 age = graph.edges[edge_id]
    349 
    350                 if age >= max_edge_age:

KeyError: (<neupy.algorithms.competitive.growing_neural_gas.NeuronNode object at 0x7f2d9ecff780>, <neupy.algorithms.competitive.growing_neural_gas.NeuronNode object at 0x7f2d9ecff7f0>)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
VioletMcommented, Jan 17, 2019

Thank you very much!

I will test it and will let you know about results.

Best regards, Violetta Mishechkina

ср, 16 янв. 2019 г., 23:55 Yurii Shevchuk notifications@github.com:

I added fix into the release/v0.7.3 branch, See PR #230 https://github.com/itdxer/neupy/pull/230 I will appreciate if you can test that it works for you. I added separate case for the pickle storage: https://github.com/itdxer/neupy/pull/230/files#diff-b10ea35f973f702cfca0ff6e3824230fR100

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itdxer/neupy/issues/229#issuecomment-454937332, or mute the thread https://github.com/notifications/unsubscribe-auth/AIt05aEHnLLTJNsKiV7yLkS8OMfox_05ks5vD5GwgaJpZM4aDaTA .

0reactions
VioletMcommented, Jan 18, 2019

Release 0.7.3 works fine, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Neural gas - Wikipedia
Neural gas is an artificial neural network, inspired by the self-organizing map and introduced in 1991 by Thomas Martinetz and Klaus Schulten.
Read more >
neupy.algorithms.competitive.growing_neural_gas module
Growing Neural Gas (GNG) algorithm. ... It means that if edge won't be updated for max_edge_age iterations than it would be removed.
Read more >
Growing Neural Gas Implementation - GitHub
This is an implementation of Growing Neural Gas (GNG) algorithm, an unsupervised machine learning model based on Self-organizing Map (SOM) useful for learning ......
Read more >
Olives: Safe Methods for Home Pickling - ANR Catalog
The gas is naturally produced by the bacteria that are responsible for the fermentation. If brine leaks out, replace it with fresh strong...
Read more >
Quantifying hard retinal exudates using Growing Neural Gas ...
The general idea of the growing neural gas algorithm: begin by two randomly placed neurons, and add new neurons every once in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found