serhii.net

In the middle of the desert you can say anything you want

19 Feb 2020

Day 415

Ambient sleeping pill

Ambient Sleeping Pill – Internet Radio for Sleep, Meditation & Relaxation is what it says it is. Background music is okay. “For sleep, meditation or study”. Nice alternative to brain.fm

Intellij idea “Add as content source” getting ignored that leads to “module not found” in Python depending on the order of the files of $PYTHONPATH and/or sys.path

I had two modules, both marked as source roots, with conflicting subfolder names. It could not find modules inside the second folder. Right click → Unload modules helped; I could unload the conflicting module, after this it happily started importing the files from the second source root. This is a band-aid fix but for now it works; TODO later find out a better way to solve these problems.

If not, there are always uglier hacks like sys.path.extend(['folder_marked_as_source_root_that_doesn't_seem_to_get_added_to_$PATH'])

Emulate Python prompt during debugging in Intellij Idea

An interactive shell can be used during debugging in intellij idea! See Interactive console during debug? – IDEs Support (IntelliJ Platform) | JetBrains

Keras saving model ‘Not JSON Serializable’ error

Cannot export Keras model TypeError: (‘Not JSON Serializable:’, b’\n…’) · Issue #27112 · tensorflow/tensorflow - yet another reason to use Keras’ own methods. tf.concat -> tf.keras.layers.Concatenate etc etc etc.

Keras loading weights from only some layers of the model

machine learning - How to load only specific weights on Keras - Stack Overflow

If your first 9 layers are consistently named between your original trained model and the new model, then you can use model.load_weights() with by_name=True. This will update weights only in the layers of your new model that have an identically named layer found in the original trained model.

Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus