Beispiel #1
0
import tensorflow as tf
import numpy as np
from get_v3 import get_test_csi
import os
import time

random_point = list(np.array([1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17]))
param = 14
test_loc = random_point[param - 1]
print(test_loc)
csi = get_test_csi(test_loc)  # 10*90
csi = np.squeeze(csi)

n_hidden_1 = 30  # 1st layer num features
n_hidden_2 = 20  # 2nd layer num features
n_hidden_3 = 10
n_hidden_4 = 5
n_input = 90

ers = []
times = []

# Applying encode and decode over test set
for k in range(1,
               14):  # give to all trained network for each point ---> DeepFi
    X = tf.placeholder("float", [None, n_input])
    with tf.Session() as sess:
        sess.run(tf.global_variables_initializer())
        saver1 = tf.train.import_meta_graph('model/Test' + str(param) + '/' +
                                            str(k) + '/trained_variables' +
                                            str(param) + str(k) + '.ckpt.meta')
import tensorflow as tf
import numpy as np
from get_v3 import get_test_csi
import os
import multiprocessing
from Detemine_error import compute_error_metric
import time

random_points = list(
    np.array([1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19]))
param = 16
test_loc = random_points[param - 1]
csi = get_test_csi(test_loc)
csi = np.squeeze(csi)
print(csi.shape)

n_hidden_1 = 45  # 1st layer num features
n_hidden_2 = 20  # 2nd layer num features
n_hidden_3 = 10
n_hidden_4 = 5
n_input = 90
n_labels = 15

X = tf.placeholder("float", [None, n_input])

new_input = csi[1:6, :]  # for example give some packets input
#print(new_input.shape)

errors = []
times = []