Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
super(Memory, self).__init__(*args, **kwargs)
self.record_space = Dict(
state=Dict(state1=float, state2=float),
reward=float
)
self.memory = self.get_variable("memory", trainable=False, from_space=self.record_space)
self.index = self.get_variable("index", trainable=False, dtype=int)
self.capacity = 5
# TODO: put this into splitter component:
self.var_list = [self.memory["state"]["state1"], self.memory["state"]["state2"], self.memory["reward"]]
# TODO: this is normally done automatically by Component (see commented-out code below)
self.insert = autograph.to_graph(self.computation_insert, verbose=True, partial_types={int}) #, partial_types={str, tuple})
#self.define_inputs("record")
def __init__(self, *args, **kwargs):
super(Memory, self).__init__(*args, **kwargs)
self.record_space = Dict(
state=Dict(state1=float, state2=float),
reward=float
)
self.memory = self.get_variable("memory", trainable=False, from_space=self.record_space)
self.index = self.get_variable("index", trainable=False, dtype=int)
self.capacity = 5
# TODO: put this into splitter component:
self.var_list = [self.memory["state"]["state1"], self.memory["state"]["state2"], self.memory["reward"]]
# TODO: this is normally done automatically by Component (see commented-out code below)
self.insert = autograph.to_graph(self.computation_insert, verbose=True, partial_types={int}) #, partial_types={str, tuple})
#self.define_inputs("record")