Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexis Brenon
arcades
Commits
030eb57e
Commit
030eb57e
authored
Aug 02, 2017
by
Alexis Brenon
Browse files
Merge branch 'master' into xp/A1-synthetic-raw-long-1
parents
feb6f9aa
cf7b1a43
Changes
1
Hide whitespace changes
Inline
Side-by-side
arcades/environment/states/datasource/labelled/AnnotatedLabelledDataProvider.lua
View file @
030eb57e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment