1 Star 1 Fork 0

zhoub86/ML-in-physical-layer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Train_SNR.py 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
FassyGit 提交于 2018-03-12 22:01 . Test for the difference of the train_SNR
from AutoEncoder_BasicModel import AutoEncoder
import matplotlib.pyplot as plt
import numpy as np
EbNodB_low= -4
EbNodB_high= 8.5
EbNodB_num= 26
M=16
n_channel=7
k=4
emb_k=16
#EbNodB_train=7
train_data_size=10000
bertest_data_size=70000
#Train_EbNodB_range = list(np.linspace(start=-4, stop=8, num=13))
Train_EbNodB_range = list(np.linspace(start=5, stop=8, num=4))
EbNodB_range = list(np.linspace(start=EbNodB_low, stop=EbNodB_high, num=EbNodB_num))
for train_EnNodB in Train_EbNodB_range:
model_test3 = AutoEncoder(CodingMeth='Embedding', M=M, n_channel=n_channel, k=k, emb_k=emb_k, EbNodB_train=train_EnNodB,
train_data_size=train_data_size)
model_test3.Initialize()
model_test3.Cal_BLER(bertest_data_size=bertest_data_size,EbNodB_low=EbNodB_low ,EbNodB_high=EbNodB_high ,
EbNodB_num=EbNodB_num )
print(model_test3.EbNodB_train)
plt.plot(EbNodB_range, model_test3.ber,label = 'Train_SNR:%f' % (train_EnNodB)
)
#label = 'Train_SNR:%f' % (train_EnNodB)
plt.yscale('log')
plt.legend(fontsize='xx-small')
plt.title('AutoEncoder,Embedding,(%d,%d)emb_k:%d'%(n_channel,k, emb_k))
plt.xlabel('SNR_RANGE')
plt.ylabel('Block Error Rate')
plt.grid()
plt.savefig('AutoEncoder,SNR_train,Embedding,(%d,%d)emb_k:%d.png'%(n_channel,k, emb_k))
plt.show()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/zhoub86/ML-in-physical-layer.git
git@gitee.com:zhoub86/ML-in-physical-layer.git
zhoub86
ML-in-physical-layer
ML-in-physical-layer
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385