深度学习中用到的一些函数
生活随笔
收集整理的這篇文章主要介紹了
深度学习中用到的一些函数
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1.np.poly1d()
通過np.ploy1d(p[1,1]) 會返回一個 f(x) = 1x+1
2.np.random.normal()
?
3.np.random.rand()
4.np.linspace()
得到等差數(shù)列
numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0) Return evenly spaced numbers over a specified interval. ———————————————— 版權聲明:本文為CSDN博主「Asher117」的原創(chuàng)文章,遵循CC 4.0 BY-SA版權協(xié)議,轉載請附上原文出處鏈接及本聲明。 原文鏈接:https://blog.csdn.net/Asher117/article/details/87855493start:返回樣本數(shù)據(jù)開始點
stop:返回樣本數(shù)據(jù)結束點
num:生成的樣本數(shù)據(jù)量,默認為50
endpoint:True則包含stop;False則不包含stop
retstep:If True, return (samples, step), where step is the spacing between samples.(即如果為True則結果會給出數(shù)據(jù)間隔)
dtype:輸出數(shù)組類型
axis:0(默認)或-1
?
5.np.meshigrid() 生成二維矩陣 (具體見收藏)
6.np.ndenumerate()
Z = np.arange(9).reshape(3,3) print(Z) for (x,y),value in np.ndenumerate(Z):print('(x,y)',x,y , ' value:',value) for index , value in np.ndenumerate(Z):print('index:',x,y , ' value:',value)?
7.np.arange
?
?
總結
以上是生活随笔為你收集整理的深度学习中用到的一些函数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java *1.13(代数:求解2 ×
- 下一篇: 关于连接PostgreSQL时提示 FA