from local_utils import *
%pylab inline
Populating the interactive namespace from numpy and matplotlib
WARNING: pylab import has clobbered these variables: ['draw_if_interactive', 'new_figure_manager'] `%matplotlib` prevents importing * from pylab and numpy
2015 Nov 27 @師大附中 (MIT License http://github.com/tjwei/math-can-see-dimensions)
(轉寄信、民間傳說故事)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
---John von Neumann
!./rungeogebra
show_dct_fig()
img = mpimg.imread('img/abel.jpg'); plt.imshow(img, cmap=mpl.cm.gray);
show_image(img)
tiny = img[40:48, 64:72];show_image(tiny)
現代數學的書只分成兩種
那些你讀不完第一行的。
--- C. N. Yang
tinyDCT = doDCT(tiny);show_image(tinyDCT)
figure(figsize=(12,36))
for u in range(12):
subplot(6, 2, u+1)
title(str(u))
imshow(dct_all(img, u), cmap=mpl.cm.gray, interpolation="none")
A. Oliva, A. Torralba, P.G. Schyns (2006). Hybrid Images. ACM Transactions on Graphics, ACM Siggraph, 25-3, 527-530.
A Neural Algorithm of Artistic Style" by Gatys, Ecker and Bethge. (26 Aug 2015)
http://arxiv.org/abs/1508.06576, http://arxiv.org/abs/1505.07376, http://bethgelab.org/deepneuralart/.
The difference between science and magic is that magicians usually know what they're doing.
-- Ashleigh Brilliant
$\left(\begin{matrix}p(0)\ p(1)\ p(-1)\ p(-2)\ p(\infty) \end{matrix}\right)=\left(\begin{matrix}0 & 0 & 1\ 1 & 1 & 1\ 1 & -1 & 1\ 4 & -2 & 1\ 1 & 0 & 0 \end{matrix}\right)\left(\begin{matrix}3\ 5\ 2 \end{matrix}\right)$
$\left(\begin{matrix}q(0)\ q(1)\ q(-1)\ q(-2)\ q(\infty) \end{matrix}\right)=\left(\begin{matrix}0 & 0 & 1\ 1 & 1 & 1\ 1 & -1 & 1\ 4 & -2 & 1\ 1 & 0 & 0 \end{matrix}\right)\left(\begin{matrix}5\ 1\ 6 \end{matrix}\right)$
$\left(\begin{matrix}r(0)\ r(1)\ r(-1)\ r(-2)\ r(\infty) \end{matrix}\right)=\left(\begin{matrix}p(0)q(0)\ p(1)q(1)\ p(-1)q(-1)\ p(-2)q(-2)\ p(\infty)q(\infty) \end{matrix}\right).$
$\left(\begin{matrix}r(0)\ r(1)\ r(-1)\ r(-2)\ r(\infty) \end{matrix}\right)=\left(\begin{matrix}0 & 0 & 0 & 0 & 1\ 1 & 1 & 1 & 1 & 1\ 1 & -1 & 1 & -1 & 1\ 16 & -8 & 4 & -1 & 1\ 1 & 0 & 0 & 0 & 0 \end{matrix}\right)\left(\begin{matrix}?\ ?\ ?\ ?\ ? \end{matrix}\right).$
show_dct_fig()
w('掌法')
('碧波', 0.8786735696108291) ('六七招', 0.8602076020115597) ('這路', 0.8328916738324939) ('拳法', 0.8291271932190515) ('降龍十八掌', 0.8038379575378314) ('外家', 0.7971126129482238)
w('蛤蟆功')-w('歐陽鋒')+ w('洪七公')
('降龍十八掌', 0.26691697876367115) ('拳法', 0.2608070228799759) ('靈蛇', 0.25582180430784784) ('掌法', 0.2548873923161527) ('家傳', 0.2535258085466294) ('所授', 0.250061078437255)
w("華箏")-w("郭靖") + w("周師兄")
('劉貴妃', 0.32884437986708626) ('皇爺', 0.3223600856772646) ('娶', 0.32044793109124564) ('我見', 0.3061185546085906) ('過世', 0.303332889431394) ('去世', 0.29416041969002693)
w('丘處機') + (w('鐵杖')-w("柯鎮惡"))
('長劍', 0.3016226574224647) ('焦木', 0.2995734699696353) ('金龍', 0.296509977226307) ('鞭', 0.28455708122842804) ('袍袖', 0.2840341409468587) ('毒龍', 0.27535583926544316)
w("鐵掌") + (w('周伯通')-w("空明拳"))
('裘千仞', 0.3249880468971764) ('鬧', 0.301599134320795) ('幫', 0.2603470882148582) ('裘幫主', 0.25407513503895546) ('瞧見', 0.24491260928373348) ('山腰', 0.24078460883957994)
w('降龍十八掌')-w("郭靖")
('一門', 0.40075134620361336) ('絕招', 0.39389429085784866) ('家數', 0.3905594694915088) ('神龍', 0.3884201584832626) ('家傳', 0.3825764006590025) ('絕技', 0.3795906816042369)
w("飯")-w("吃")+w("喝")
('一杯', 0.2818706313259437) ('杯酒', 0.2806620632516209) ('碗', 0.2717481336700087) ('半碗', 0.26724824180754236) ('斟', 0.2671082766766137) ('咕嘟', 0.26332281719493456)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
Alec Radford, Luke Metz, Soumith Chintala
Nov 19 2015