- https://ru.linkedin.com › max-drobin-a11b05154
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Short and sweet LSTM implementation in Tensorflow. | |
Motivation: | |
When Tensorflow was released, adding RNNs was a bit of a hack - it required | |
building separate graphs for every number of timesteps and was a bit obscure | |
to use. Since then TF devs added things like `dynamic_rnn`, `scan` and `map_fn`. | |
Currently the APIs are decent, but all the tutorials that I am aware of are not | |
making the best use of the new APIs. | |
Advantages of this implementation: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# credit for catching error: | |
# https://unix.stackexchange.com/questions/423401/show-error-message-if-bash-script-terminates-due-to-set-e | |
set -e | |
err_report() { | |
echo "Error on line $1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/Bin/bash | |
# https://unix.stackexchange.com/questions/423401/show-error-message-if-bash-script-terminates-due-to-set-e | |
set -e | |
err_report() { | |
echo "Error on line $1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Как сервисы наподобие youtube завладевавают вниманием? | |
# Пусть вероятность отвлечься на один фактор = 10%, тогда, если факторов уже 10 (их | |
# расположение не имеет значения - то есть можно их менять местами), то: | |
def C(n, k): | |
if 0 <= k <= n: | |
nn = 1 | |
kk = 1 | |
for t in range(1, min(k, n - k) + 1): |