diff --git a/torchvision/csrc/cpu/image/read_image_cpu.cpp b/torchvision/csrc/cpu/image/read_image_cpu.cpp index 0bd12d9c2e5..ad11ee666b9 100644 --- a/torchvision/csrc/cpu/image/read_image_cpu.cpp +++ b/torchvision/csrc/cpu/image/read_image_cpu.cpp @@ -1,5 +1,5 @@ #include "read_image_cpu.h" -#include +#include torch::Tensor decode_image(const torch::Tensor& data) { // Check that the input tensor dtype is uint8 diff --git a/torchvision/csrc/cpu/image/read_write_file_cpu.cpp b/torchvision/csrc/cpu/image/read_write_file_cpu.cpp index fd5ae1f0622..99f02d8247d 100644 --- a/torchvision/csrc/cpu/image/read_write_file_cpu.cpp +++ b/torchvision/csrc/cpu/image/read_write_file_cpu.cpp @@ -46,7 +46,7 @@ void write_file(std::string filename, torch::Tensor& data) { auto fileCStr = filename.c_str(); FILE* outfile = fopen(fileCStr, "wb"); - TORCH_CHECK(outfile != NULL, "Error opening output file"); + TORCH_CHECK(outfile != nullptr, "Error opening output file"); fwrite(fileBytes, sizeof(uint8_t), data.numel(), outfile); fclose(outfile);