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
GPUconfig = tf.ConfigProto( | |
gpu_options=tf.GPUOptions( | |
allow_growth=True | |
, visible_device_list="0" | |
) | |
, device_count={"GPU":1} | |
) | |
with tf.Session(graph=graph, config=GPUconfig) as sess: | |
print(sess.run()) |
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
# 画面をリフレッシュしつつアタッチ | |
tmux a -d |
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
import numpy as np | |
print("range: ", np.max(X[0]), np.min(X[0])) |
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
# 便利なデバッガー | |
import pdb; pdb.set_trace() | |
# 毎回書くアレ。画像表示用関数 | |
import matplotlib.pyplot as plt | |
def single_color(img, dpi=72): | |
plt.figure(dpi=dpi) | |
plt.imshow(img) | |
plt.show() | |
plt.close() |
NewerOlder