-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only CPU machine implementation #6
Comments
Yes, just simply delete .cuda(...) in the scripts. To load saved GPU models to CPU-only machine, just modify the load part as follow: |
Thank you, I made the changes you mentioned. That got me here: def forward(self, input, output_size=None):
ERROR MESSAGE: File "C:\Users\Admin.spyder-py3\Capsule-Forensics-v2-master\test_binary_ffpp.py", line 63, in File "C:\Users\Admin\Miniconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call File "C:\Users\Admin.spyder-py3\Capsule-Forensics-v2-master\model_big.py", line 53, in forward File "C:\Users\Admin\Miniconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call File "C:\Users\Admin\Miniconda3\lib\site-packages\torch\nn\modules\container.py", line 92, in forward File "C:\Users\Admin\Miniconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call File "C:\Users\Admin\Miniconda3\lib\site-packages\torch\nn\modules\conv.py", line 338, in forward TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not int Can you please help? |
I think this is a bug of PyTorch. Could you check the following link? |
I am trying to run the code on a cpu only machine. Please can anyone tell me the changes i need to make in all the codes. Are there any ways to execute on a NO GPU machine?
I have explored a few options but stuck right now at
runfile('C:/Users/Admin/.spyder-py3/Capsule-Forensics-v2-master/train_binary_ffpp.py', wdir='C:/Users/Admin/.spyder-py3/Capsule-Forensics-v2-master')
Namespace(batchSize=32, beta1=0.9, cpu_id=0, dataset='databases/faceforensicspp', disable_random=False, dropout=0.05, imageSize=300, lr=0.0005, manualSeed=None, niter=25, outf='checkpoints/binary_faceforensicspp', resume=0, train_set='train', val_set='validation', workers=0)
Random Seed: 3435
Traceback (most recent call last):
File "C:\Users\Admin.spyder-py3\Capsule-Forensics-v2-master\train_binary_ffpp.py", line 76, in
capsule_loss = model_big.CapsuleLoss(opt.cpu_id)
File "C:\Users\Admin.spyder-py3\Capsule-Forensics-v2-master\model_big.py", line 200, in init
self.cross_entropy_loss.to('cpu')(cpu_id)
File "C:\Users\Admin\Miniconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'target'
The text was updated successfully, but these errors were encountered: