资源简介

基于深度学习的通信信号调制方式识别,cldnn,lstm,resnet

资源截图

代码片段和文件信息


# coding: utf-8

# ## Modulation Recognition Example: RML2016.10b Dataset + VT-CNN2 Mod-Rec Network
# More information on this classification method can be found at
# https://arxiv.org/abs/1602.04105
# More information on the RML2016.10b dataset can be found at
# http://pubs.gnuradio.org/index.php/grcon/article/view/11
# Please cite derivative works
# ‘‘‘
# @article{convnetmodrec
#   title={Convolutional Radio Modulation Recognition Networks}
#   author={O‘Shea Timothy J and Corgan Johnathan and Clancy T. Charles}
#   journal={arXiv preprint arXiv:1602.04105}
#   year={2016}
# }
# @article{rml_datasets
#   title={Radio Machine Learning Dataset Generation with GNU Radio}
#   author={O‘Shea Timothy J and West Nathan}
#   journal={Proceedings of the 6th GNU Radio Conference}
#   year={2016}
# }
# ‘‘‘
# To run this example you will need to download or generate the RML2016.10b dataset (https://radioml.com/datasets/)
# You will also need Keras installed with either the Theano or Tensor Flow backend working.
# Have fun!

“““
Run code for CLDNN Sub-Sampling PCA and SNR Training experiments by uncommenting the appropriate code blocks
For all the experiments the value on line 224 (11200 for no modifications) must be changed according to the dimensions specified-
128 (1) -> 11200; 64 (1/2) -> 6080; 32 (1/4) -> 3520; 16 (1/8) -> 2240; 8 (1/16) -> 1600; 4 (1/32) -> 1280
For PCA experiments: Uncomment ‘PCA Setup‘ and ‘PCA‘ code blocks
For Sub-Sampling experiments: Uncomment ‘Sub-Sampling Setup‘ and 1 of the 3 subsampling code blocks
For Individual SNR Training experiments: Uncomment ‘SNR Setup‘ and ‘SNR Training‘ code blocks
For no dimensionality reduction experiments: Run the code as is without uncommenting any code block
“““

# In[1]:
# Import all the things we need ---
# by setting env variables before Keras import you can set up which backend and which GPU it uses
#get_ipython().magic(u‘matplotlib inline‘)
import osrandom
#os.environ[“KERAS_BACKEND“] = “theano“
os.environ[“KERAS_BACKEND“] = “tensorflow“
#os.environ[“THEANO_FLAGS“]  = “device=gpu%d“%(1)   #disabled because we do not have a hardware GPU
import numpy as np
#import theano as th
#import theano.tensor as T
from keras.utils import np_utils
import keras.models as models
from keras.layers.core import ReshapeDenseDropoutActivationFlatten
from keras.layers.convolutional import Conv2D MaxPooling2D ZeroPadding2D
from keras.regularizers import *
from keras.optimizers import adam
from keras.optimizers import adagrad
import matplotlib
matplotlib.use(‘Agg‘)
import matplotlib.pyplot as plt
import seaborn as sns
import cPickle random sys keras
from keras.utils import multi_gpu_model
from keras import backend as K
K.tensorflow_backend._get_available_gpus()
import tensorflow as tf

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Sub-Sampling Setup
“““sub_samples = 16“    # Number of samples after Sub-Sampling“““
# ~~~~~~~~~~~~~

评论

共有 条评论