jherng commited on
Commit
f27e353
1 Parent(s): f874d2e

Update xd-violence.py

Browse files
Files changed (1) hide show
  1. xd-violence.py +4 -4
xd-violence.py CHANGED
@@ -175,7 +175,7 @@ class XDViolence(datasets.GeneratorBasedBuilder):
175
 
176
  if self.config.name == "i3d_rgb":
177
  # Download features
178
- train_paths = dl_manager.download_and_extract(
179
  [
180
  urllib.parse.quote(
181
  urllib.parse.urljoin(_URL, f"i3d_rgb/{x}.npy"), safe=":/"
@@ -184,7 +184,7 @@ class XDViolence(datasets.GeneratorBasedBuilder):
184
  ]
185
  )
186
 
187
- test_paths = dl_manager.download_and_extract(
188
  [
189
  urllib.parse.quote(
190
  urllib.parse.urljoin(_URL, f"i3d_rgb/{x}.npy"), safe=":/"
@@ -195,7 +195,7 @@ class XDViolence(datasets.GeneratorBasedBuilder):
195
 
196
  else:
197
  # Download videos
198
- train_paths = dl_manager.download_and_extract(
199
  [
200
  urllib.parse.quote(
201
  urllib.parse.urljoin(_URL, f"video/{x}.mp4"), safe=":/"
@@ -204,7 +204,7 @@ class XDViolence(datasets.GeneratorBasedBuilder):
204
  ]
205
  )
206
 
207
- test_paths = dl_manager.download_and_extract(
208
  [
209
  urllib.parse.quote(
210
  urllib.parse.urljoin(_URL, f"video/{x}.mp4"), safe=":/"
 
175
 
176
  if self.config.name == "i3d_rgb":
177
  # Download features
178
+ train_paths = dl_manager.download(
179
  [
180
  urllib.parse.quote(
181
  urllib.parse.urljoin(_URL, f"i3d_rgb/{x}.npy"), safe=":/"
 
184
  ]
185
  )
186
 
187
+ test_paths = dl_manager.download(
188
  [
189
  urllib.parse.quote(
190
  urllib.parse.urljoin(_URL, f"i3d_rgb/{x}.npy"), safe=":/"
 
195
 
196
  else:
197
  # Download videos
198
+ train_paths = dl_manager.download(
199
  [
200
  urllib.parse.quote(
201
  urllib.parse.urljoin(_URL, f"video/{x}.mp4"), safe=":/"
 
204
  ]
205
  )
206
 
207
+ test_paths = dl_manager.download(
208
  [
209
  urllib.parse.quote(
210
  urllib.parse.urljoin(_URL, f"video/{x}.mp4"), safe=":/"