-
大小: 7.6MB文件類型: .rar金幣: 2下載: 0 次發布日期: 2023-09-23
- 語言: 其他
- 標簽: Tensorflow??
資源簡介
基于Tensorflow的小波神經網絡實驗,給出實驗用的測試以及訓練的數據集,實驗在Pycharm中已經進行了論證。

代碼片段和文件信息
import?tensorflow?as?tf
import?numpy?as?np
from?flask.globals?import?session
file_name?=?‘shiyu_train.txt‘
def?pinyu_201fc_read(path):
????x?=?[]
????y?=?[]
????fp?=?open(path?“r“)
????for?line?in?fp.readlines():
????????line?=?line.rstrip()
????????if?not?line:
????????????continue
????????ss?=?line.split(“?“)
????????assert?(len(ss)?==?(204))
????????lx?=?[]
????????ly?=?[]
????????for?i?in?range(201):
????????????lx.append(float(ss[i]))
????????????if?i?==?200:
????????????????ly.append(float(ss[201]))
????????????????ly.append(float(ss[202]))
????????????????ly.append(float(ss[203]))
????????x.append(lx)
????????y.append(ly)
????fp.close()
#?????print(np.array(x).reshape(30088).shape?np.array(y))
????return?np.array(xdtype=np.float32)?np.array(ydtype=np.float32)
def?shiyu_800_read(path):
????x?=?[]
????y?=?[]
????fp?=?open(path?“r“)
????for?line?in?fp.readlines():
????????line?=?line.rstrip()
????????if?not?line:
????????????continue
????????ss?=?line.split(“?“)
????????assert?(len(ss)?==?(803))
????????lx?=?[]
????????ly?=?[]
????????for?i?in?range(800):
????????????lx.append(float(ss[i]))
????????????if?i?==?799:
????????????????ly.append(float(ss[800]))
????????????????ly.append(float(ss[801]))
????????????????ly.append(float(ss[802]))
????????x.append(lx)
????????y.append(ly)
????fp.close()
#?????print(np.array(x).reshape(30088).shape?np.array(y))
????return?np.array(xdtype=np.float32)?np.array(ydtype=np.float32)
def?shiyu_tezheng_read(path):
????x?=?[]
????y?=?[]
????fp?=?open(path?“r“)
????for?line?in?fp.readlines():
????????line?=?line.rstrip()
????????if?not?line:
????????????continue
????????ss?=?line.split(“?“)
????????assert?(len(ss)?==?(14))
????????lx?=?[]
????????ly?=?[]
????????for?i?in?range(11):
????????????lx.append(float(ss[i]))
????????????if?i?==?10:
????????????????ly.append(float(ss[11]))
????????????????ly.append(float(ss[12]))
????????????????ly.append(float(ss[13]))
????????x.append(lx)
????????y.append(ly)
????fp.close()
#?????print(np.array(x).reshape(30088).shape?np.array(y))
????return?np.array(xdtype=np.float32)?np.array(ydtype=np.float32)
if?__name__==‘__main__‘:
????xy=shiyu_800_read(file_name)
????print(x.shapey.shape)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????301??2018-10-26?10:17??Wavelet_Neural\.idea\misc.xm
?????文件????????280??2018-10-26?10:15??Wavelet_Neural\.idea\modules.xm
?????文件????????512??2018-10-26?10:17??Wavelet_Neural\.idea\Wavelet_Neural.iml
?????文件??????11042??2018-11-12?16:27??Wavelet_Neural\.idea\workspace.xm
?????文件???????2296??2018-10-24?17:10??Wavelet_Neural\data_read.py
?????文件????????372??2018-10-24?17:10??Wavelet_Neural\input_data.py
?????文件?????165420??2018-10-26?16:12??Wavelet_Neural\pinyu201wei_juanji_test_guiyi.txt
?????文件?????385980??2018-10-26?16:12??Wavelet_Neural\pinyu201wei_juanji_train_guiyi.txt
?????文件???????5328??2018-10-24?17:10??Wavelet_Neural\ricker.py
?????文件???????7095??2018-10-24?17:10??Wavelet_Neural\shiyutezheng.py
?????文件?????689204??2018-10-24?17:10??Wavelet_Neural\shiyu_test.txt
?????文件??????11643??2018-10-24?17:10??Wavelet_Neural\shiyu_tezheng_test.txt
?????文件??????27144??2018-10-24?17:10??Wavelet_Neural\shiyu_tezheng_train.txt
?????文件????1607349??2018-10-24?17:09??Wavelet_Neural\shiyu_train.txt
?????文件???????1096??2018-10-31?14:51??Wavelet_Neural\TSNE.py
?????文件?????????54??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\easy-install.pth
?????文件??????????1??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\EGG-INFO\dependency_li
?????文件?????????68??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\EGG-INFO\entry_points.txt
?????文件??????????1??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\EGG-INFO\not-zip-safe
?????文件???????2639??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\EGG-INFO\PKG-INFO
?????文件?????????64??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\EGG-INFO\requires.txt
?????文件??????10147??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\EGG-INFO\SOURCES.txt
?????文件??????????4??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\EGG-INFO\top_level.txt
?????文件??????11910??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\pip\ba
?????文件??????10465??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\pip\ba
?????文件??????16474??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\pip\cmdoptions.py
?????文件???????1382??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\pip\commands\check.py
?????文件???????2453??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\pip\commands\completion.py
?????文件???????7810??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\pip\commands\download.py
?????文件???????2835??2018-10-26?10:15??Wavelet_Neural\venv\Lib\site-packages\pip-9.0.1-py3.6.egg\pip\commands\freeze.py
............此處省略344個文件信息
- 上一篇:軟件工程師考試題目
- 下一篇:SPS入門教程.pdf
評論
共有 條評論