Skip to content

Commit fb89cbb

Browse files
authored
Fix platform type inconsistency custom-dataset.cpp
1 parent cdef4d4 commit fb89cbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/custom-dataset/custom-dataset.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct Options {
2121

2222
static Options options;
2323

24-
using Data = std::vector<std::pair<std::string, long>>;
24+
using Data = std::vector<std::pair<std::string, int64_t>>;
2525

2626
class CustomDataset : public torch::data::datasets::Dataset<CustomDataset> {
2727
using Example = torch::data::Example<>;
@@ -73,7 +73,7 @@ std::pair<Data, Data> readInfo() {
7373
std::ifstream stream(options.infoFilePath);
7474
assert(stream.is_open());
7575

76-
long label;
76+
int64_t label;
7777
std::string path, type;
7878

7979
while (true) {

0 commit comments

Comments
 (0)