Hi, guys
I have some error while running the the DCGAN sample from the official tutorial.
- I have downloaded the MNIST and saved them in the folder “C:\Users\Administrator\Desktop\MINIST_data”
- There is no error while i generate solutions
- while i run the project , it shows error in the "torch::data::datasets::MNIST(“C:/Users/Administrator/Desktop/MINIST_data”)".map(torch::data::transforms::Normalize<>(0.5, 0.5)).map(torch::data::transforms::Stack<>());
- The error is “There is an unhandled exception at 0x00007ffcfcd03fb8 (in dcgan. Exe): Microsoft C + + exception: C10:: error, at memory location 0x000000182cf2e360.”
Is there something wrong with my path? How should i setup the path?
The following is the code:
auto dataset = torch::data::datasets::MNIST(“C:/Users/Administrator/Desktop/MINIST_data”)
.map(torch::data::transforms::Normalize<>(0.5, 0.5))
.map(torch::data::transforms::Stack<>());
const int64_t batches_per_epoch =
std::ceil(dataset.size().value() / static_cast(kBatchSize));
auto data_loader = torch::data::make_data_loader(
std::move(dataset),
torch::data::DataLoaderOptions().batch_size(kBatchSize).workers(2));
torch::optim::Adam generator_optimizer(
generator->parameters(), torch::optim::AdamOptions(2e-4).beta1(0.5));
torch::optim::Adam discriminator_optimizer(
discriminator->parameters(), torch::optim::AdamOptions(2e-4).beta1(0.5));