Vous avez re莽u un message "Your GitLab account has been locked ..." ? Pas d'inqui茅tude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 55817bac authored by Alexis Brenon's avatar Alexis Brenon
Browse files

馃崚 07f9b52d 馃殤 Fix arcades and logger access

parent feb6f9aa
......@@ -11,20 +11,25 @@ local class, super = torch.class(
'DataSource',
module)
function class:__init(args)
super.__init(self, args)
function class:__init(args, dump)
super.__init(self, args, dump)
args = args or {}; dump = dump or {}
self.environment_model = args.environment_model
self.data_path = args.data_path
self.logger:debug("Loading data from '%s'", self.data_path)
self.data = self:_parse_data(self.data_path)
if dump.data then
self.data = dump.data
else
self._logger:debug("Loading data from '%s'", self.data_path)
self.data = self:_parse_data(self.data_path)
end
--- ID (subject index, event index) of the last returned state
-- @within Attributes
-- @tfield number self.last_state[1] Subject ID
-- @tfield number self.last_state[2] Event ID
-- @table self.last_state
self.last_state = {1,0}
self.last_state = dump.last_state or {1,0}
self.max_tries = args.max_tries or 1
self.remaining_tries = args.remaining_tries or self.max_tries
self.remaining_tries = dump.remaining_tries or self.max_tries
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment