-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy patheval_example.m
54 lines (42 loc) · 1.41 KB
/
eval_example.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% AUTHOR: Aaron Nicolson
% AFFILIATION: Signal Processing Laboratory, Griffith University
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
clear all; close all; clc
% TO DO: REVERSE Y-AXIS TICKS!
%
% In main.py, set deepxi.train(..., save_example=True) to get .mat training
% mini-batch example.
%
load('inp_batch.mat')
load('tgt_batch.mat')
load('seq_mask_batch.mat')
%% PLOT
for i = 1:size(inp_batch, 1)
figure (i)
% Observation/input.
inp = rot90(squeeze(inp_batch(i,:,:)));
% Target: mapped a priori SNR.
tgt = rot90(squeeze(tgt_batch(i,:,:)));
% Sequence mask.
seq_mask = seq_mask_batch(i,:,:);
subplot(3,1,1); imagesc(flipud(inp)); colorbar;
xlabel('Time-frame bin')
ylabel('Frequency bin')
title('Observation')
set(gca,'YDir','normal')
subplot(3,1,2); imagesc(seq_mask); colorbar;
xlabel('Time-frame bin')
title('Sequence mask')
colorbar('XTick', [0, 1]);
set(gca,'ytick',[])
set(gca,'yticklabel',[])
subplot(3,1,3); imagesc(flipud(tgt)); colorbar;
xlabel('Time-frame bin')
ylabel('Frequency bin')
title('Target')
set(gca,'YDir','normal')
set(gcf, 'Position', get(0, 'Screensize'));
end