-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.py
34 lines (27 loc) · 906 Bytes
/
utils.py
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
class Memory:
def __init__(self):
self.actions = []
self.states = []
self.logprobs = []
self.rewards = []
self.is_terminals = []
def clear_memory(self):
del self.actions[:]
del self.states[:]
del self.logprobs[:]
del self.rewards[:]
del self.is_terminals[:]
class ProtoConvNet:
def __init__(self, inChannels, numFilters, filterStridePad, useBatchNorm):
self.inChannels = inChannels
self.numFilters = numFilters
self.filterStridePad = filterStridePad
self.useBatchNorm = useBatchNorm
class ProtoLSTMNet:
def __init__(self, numCells):
self.numCells = numCells
class ProtoMLP:
def __init__(self, layerSizes, activationFunctions, useBias):
self.layerSizes = layerSizes
self.activationFunctions = activationFunctions
self.useBias = useBias