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
# from https://stackoverflow.com/questions/30755249/hierarchy-in-matplotlib | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.pyplot as plt | |
subplot_args = {'projection':'3d'} | |
fig, ax = plt.subplots(subplot_kw=subplot_args) |
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
run_meta = tf.RunMetadata() | |
with tf.Session(config=config) as sess: | |
opts = tf.profiler.ProfileOptionBuilder.float_operation() | |
flops = tf.profiler.profile(sess.graph, run_meta=run_meta, cmd='op', options=opts) | |
opts = tf.profiler.ProfileOptionBuilder.trainable_variables_parameter() | |
params = tf.profiler.profile(sess.graph, run_meta=run_meta, cmd='op', options=opts) | |
print("ops {:,} --- params {:,}".format(flops.total_float_ops, params.total_parameters)) |
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
use "-undefined dynamic_lookup" instead of "-lpython" | |
use "-Xpreprocessor -fopenmp -lomp" instead of "-fopenmp" | |
flags to be added for lpython: "-L/usr/local/opt/libomp/lib -I/usr/include/python2.7" ? | |
get numpy include dir: np.get_include() |
NewerOlder