@@ -164,19 +164,19 @@ function DataLoader(
164
164
165
165
# Wrapping with ObsView in order to work around
166
166
# issue https://github.com/FluxML/Flux.jl/issues/1935
167
- data = ObsView (data)
167
+ _data = ObsView (data)
168
168
if batchsize > 0
169
- data = BatchView (data ; batchsize, partial, collate)
169
+ _data = BatchView (_data ; batchsize, partial, collate)
170
170
end
171
171
172
172
if buffer == true
173
- buffer = _create_buffer (data )
173
+ buffer = _create_buffer (_data )
174
174
end
175
175
P = parallel ? :parallel : :serial
176
176
# for buffer == false and external buffer, we keep as is
177
177
178
- T, B, C, R = typeof (data), typeof (buffer), typeof (collate), typeof (rng)
179
- return DataLoader {T,B,P,C,R} (data, batchsize, buffer,
178
+ T, O, B, C, R = typeof (_data), typeof (data), typeof (buffer), typeof (collate), typeof (rng)
179
+ return DataLoader {T,B,P,C,O, R} (data, _data , batchsize, buffer,
180
180
partial, shuffle, parallel, collate, rng)
181
181
end
182
182
0 commit comments