This file contains hidden or 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
Can you spot a problem in the code? | |
np.testing.assert_almost_equal(A, B, decimal=7) | |
Error log: | |
------------------------------------------------------------------------------- | |
AssertionError: | |
Arrays are not almost equal to 7 decimals | |
(mismatch 18.75%) |
This file contains hidden or 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
"""Illustration for various types of namespace scopes in TensorFlow. | |
> python tf_scopes.py | |
foo_name_scoped : | |
v.name= v:0 | |
v2.name= foo_name_scoped/v2:0 | |
a.name= Variable:0 | |
b.name= Variable_1:0 | |
result_op.name= foo_name_scoped/Add:0 | |
foo_op_scoped : |
This file contains hidden or 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
// Simple tool to store all integers which are missing in the float representation. | |
// | |
// Missing means here that if you convert integer into float and then back into | |
// integer you will not get the same integer. This experiment reveals that for | |
// 96.5% of all integers n != int(float(n)) | |
// | |
// It appears that missing integers go in blocks of length 2, 6, 14, 30, 62 | |
// and 126 of consecutive numbers (8388608 blocks of each type). | |
// And there is one single integer -33554431 who stands apart. | |
// |