Skip to content

Commit 2c8fad7

Browse files
authored
Merge branch 'main' into lajenfljnaef
2 parents 80edd48 + f022a61 commit 2c8fad7

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_macros_and_flags():
127127
if NVCC_FLAGS is None:
128128
nvcc_flags = []
129129
else:
130-
nvcc_flags = nvcc_flags.split(" ")
130+
nvcc_flags = NVCC_FLAGS.split(" ")
131131
extra_compile_args["nvcc"] = nvcc_flags
132132

133133
if sys.platform == "win32":

torchvision/csrc/io/image/cpu/decode_webp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ torch::Tensor decode_webp(
4444

4545
auto decoded_data =
4646
decoding_func(encoded_data_p, encoded_data_size, &width, &height);
47+
4748
TORCH_CHECK(decoded_data != nullptr, "WebPDecodeRGB[A] failed.");
4849

50+
auto deleter = [decoded_data](void*) { WebPFree(decoded_data); };
4951
auto out = torch::from_blob(
50-
decoded_data, {height, width, num_channels}, torch::kUInt8);
52+
decoded_data, {height, width, num_channels}, deleter, torch::kUInt8);
5153

5254
return out.permute({2, 0, 1});
5355
}

torchvision/datasets/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"QMNIST",
7373
"MNIST",
7474
"KMNIST",
75+
"MovingMNIST",
7576
"StanfordCars",
7677
"STL10",
7778
"SUN397",

0 commit comments

Comments
 (0)