forked from qinzheng93/CNN-Calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDistLearnWscNet.py
More file actions
26 lines (20 loc) · 769 Bytes
/
Copy pathDistLearnWscNet.py
File metadata and controls
26 lines (20 loc) · 769 Bytes
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
from __future__ import print_function
from DNNCalculator import Tensor, DNNCalculator
class DistLearnWscNetCalc(DNNCalculator):
def __init__(self, only_mac=True):
super(DistLearnWscNetCalc, self).__init__(only_mac)
'''
Dist. Learning for Wireless Signal Classif. Net Model.
Source: http://arxiv.org/abs/1707.08908
'''
def DistLearnWscNet(self, tensor):
tensor = self.LSTM(tensor, 600, True)
return tensor
def calculate(self):
tensor = Tensor(1, 2000, 600)
tensor = self.DistLearnWscNet(tensor)
print('params: {}, flops: {}'.format(self.params, self.flops))
if __name__ == '__main__':
only_mac = True
calculator = DistLearnWscNetCalc(only_mac=only_mac)
calculator.calculate()