Hello ,
I am getting this error (" CUDA out of memory ") when running the GAN code.
I tried to solve it by reducing the batch size , but same error appear.
so I have been tried to reduce the number of hidden layers from 256 to 128,The code has been run for all epochs.
But at the end of running the code the run time error below has been appeared .
I have stuck here for a long time. I really need some help plz.
Any help would be greatly appreciated.
And thanks in advance.
Traceback (most recent call last):
** File “main.py”, line 152, in **
** main()**
** File “main.py”, line 146, in main**
** results = malgan.measure_and_export_results()**
** File “C:\Users\malgan_init_.py”, line 393, in measure_and_export_results**
** avg_changed_bits = torch.cat(bits_changed).mean()** RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors. Available functions are [CPUTensorId, CUDATensorId, QuantizedCPUTensorId, VariableTensorId]
Just calling the function ( as declared in the attached photo) at main file
#" results = malgan.measure_and_export_results()
if args.print_results:
print(results)"
It doesn’t return any thing.
The final result returned only when the code runs correctly. Then it has been saved at csv file and the (bits_changed) has been included within it.
But in current case , it returns no value.
The code is provided as a package in the folder. A driver script is provided in main.py, which processes input arguments via argparse. The basic interface is for it is " python main.py Noise BATCH_SIZE NUM_EPOCHS MALWARE_FILE BENIGN_FILE " and runs through a command prompt.
So if you add some python print statement in the script just before the line that crashes. This should get printed in the command prompt right? Can you share that?