Done of these attempts work for me. Iām trying to run ML1 cpu only.
Specs:
WSL
Ubuntu 16.04
python 3.6.3
Anaconda3-5.0.1-Linux-x86_64.sh
created fastai-cpu with environment-cpu.yml
I removed many errors with:
conda install pytorch torchvision cpuonly -c pytorch <- from pytorch
conda install -c conda-forge python-graphviz <- from anaconda
presently my error in ml1ā¦Lession4-mnist_sgd
net = nn.Sequential(
nn.Linear(28*28, 100),
nn.ReLU(),
nn.Linear(100, 100),
nn.ReLU(),
nn.Linear(100, 10),
nn.LogSoftmax()
).cuda()
AssertionError Traceback (most recent call last)
in
5 nn.ReLU(),
6 nn.Linear(100, 10),
----> 7 nn.LogSoftmax()
8 ).cuda()
~/anaconda3/envs/fastai-cpu/lib/python3.6/site-packages/torch/nn/modules/module.py in cuda(self, device)
309 Module: self
310 āā"
ā> 311 return self._apply(lambda t: t.cuda(device))
312
313 def cpu(self):
~/anaconda3/envs/fastai-cpu/lib/python3.6/site-packages/torch/nn/modules/module.py in _apply(self, fn)
206 def _apply(self, fn):
207 for module in self.children():
ā> 208 module._apply(fn)
209
210 def compute_should_use_set_data(tensor, tensor_applied):
~/anaconda3/envs/fastai-cpu/lib/python3.6/site-packages/torch/nn/modules/module.py in _apply(self, fn)
228 # with torch.no_grad():
229 with torch.no_grad():
ā> 230 param_applied = fn(param)
231 should_use_set_data = compute_should_use_set_data(param, param_applied)
232 if should_use_set_data:
~/anaconda3/envs/fastai-cpu/lib/python3.6/site-packages/torch/nn/modules/module.py in (t)
309 Module: self
310 āā"
ā> 311 return self._apply(lambda t: t.cuda(device))
312
313 def cpu(self):
~/anaconda3/envs/fastai-cpu/lib/python3.6/site-packages/torch/cuda/init.py in _lazy_init()
176 raise RuntimeError(
177 "Cannot re-initialize CUDA in forked subprocess. " + msg)
ā> 178 _check_driver()
179 torch._C._cuda_init()
180 _cudart = _load_cudart()
~/anaconda3/envs/fastai-cpu/lib/python3.6/site-packages/torch/cuda/init.py in _check_driver()
90 def _check_driver():
91 if not hasattr(torch._C, ā_cuda_isDriverSufficientā):
ā> 92 raise AssertionError(āTorch not compiled with CUDA enabledā)
93 if not torch._C._cuda_isDriverSufficient():
94 if torch._C._cuda_getDriverVersion() == 0:
AssertionError: Torch not compiled with CUDA enabled
Any help would be appreciated.
I found the error.
I removed ā.cudaā from the nn.Sequential statement.