Pytorch v1.0.0 stable is released. Windows binaries are ready too. I have installed it on my Windows 10 machine.
Here is how to install pytorch 1.0.0 stable on Windows:
- Create a new conda env:
conda create -n fastai-v1
conda activate fastai-v1
- Install Pytorch v1.0.0 stable: choose Windows, your Python version and your Cuda version (for me Python 3.6, Cuda 9.2)
https://pytorch.org/get-started/locally/
pip is equavalent to pip3 in conda. So you can install torchvision by:
pip install torchvision
-
Install fasta-v1:
conda install -c fastai fastai
-
Clone fastai course-v3 from fastai repo (navigate to your working folder that you want to clone the notebooks to):
cd E:\projects
git clone https://github.com/fastai/course-v3.git
I tried lesson6-pets-more
notebook and learn.fit_one_cycle(3, slice(1e-2), pct_start=0.8)
gave me this error:
---------------------------------------------------------------------------PicklingError Traceback (most recent call last)
<ipython-input-14-e7e742ed4478> in <module>----> 1 learn.fit_one_cycle(3, slice(1e-2), pct_start=0.8)
~\Anaconda3\envs\fastai-v1\lib\site-packages\fastai\train.py in fit_one_cycle(learn, cyc_len, max_lr, moms, div_factor, pct_start, wd, callbacks, **kwargs) 18 callbacks.append(OneCycleScheduler(learn, max_lr, moms=moms, div_factor=div_factor,
19 pct_start=pct_start, **kwargs))
---> 20 learn.fit(cyc_len, max_lr, wd=wd, callbacks=callbacks) 21
22 def lr_find(learn:Learner, start_lr:Floats=1e-7, end_lr:Floats=10, num_it:int=100, stop_div:bool=True, **kwargs:Any):
~\Anaconda3\envs\fastai-v1\lib\site-packages\fastai\basic_train.py in fit(self, epochs, lr, wd, callbacks) 160 callbacks = [cb(self) for cb in self.callback_fns] + listify(callbacks) 161 fit(epochs, self.model, self.loss_func, opt=self.opt, data=self.data, metrics=self.metrics,
--> 162 callbacks=self.callbacks+callbacks)
163
164 def create_opt(self, lr:Floats, wd:Floats=0.)->None:
~\Anaconda3\envs\fastai-v1\lib\site-packages\fastai\basic_train.py in fit(epochs, model, loss_func, opt, data, callbacks, metrics) 92 except Exception as e: 93 exception = e
---> 94 raise e
95 finally: cb_handler.on_train_end(exception) 96
~\Anaconda3\envs\fastai-v1\lib\site-packages\fastai\basic_train.py in fit(epochs, model, loss_func, opt, data, callbacks, metrics) 80 cb_handler.on_epoch_begin() 81
---> 82 for xb,yb in progress_bar(data.train_dl, parent=pbar): 83 xb, yb = cb_handler.on_batch_begin(xb, yb) 84 loss = loss_batch(model, xb, yb, loss_func, opt, cb_handler)
~\Anaconda3\envs\fastai-v1\lib\site-packages\fastprogress\fastprogress.py in __iter__(self) 63 self.update(0) 64 try:---> 65 for i,o in enumerate(self._gen): 66 yield o
67 if self.auto_update: self.update(i+1)
~\Anaconda3\envs\fastai-v1\lib\site-packages\fastai\basic_data.py in __iter__(self) 46 "Process and returns items from `DataLoader`." 47 assert not self.skip_size1 or self.batch_size > 1, "Batch size cannot be one if skip_size1 is set to True"---> 48 for b in self.dl: 49 y = b[1][0] if is_listy(b[1]) else b[1] 50 if not self.skip_size1 or y.size(0) != 1: yield self.proc_batch(b)
~\Anaconda3\envs\fastai-v1\lib\site-packages\torch\utils\data\dataloader.py in __iter__(self) 817
818 def __iter__(self):--> 819 return _DataLoaderIter(self) 820
821 def __len__(self):
~\Anaconda3\envs\fastai-v1\lib\site-packages\torch\utils\data\dataloader.py in __init__(self, loader) 558 # before it starts, and __del__ tries to join but will get: 559 # AssertionError: can only join a started process.--> 560 w.start() 561 self.index_queues.append(index_queue) 562 self.workers.append(w)
~\Anaconda3\envs\fastai-v1\lib\multiprocessing\process.py in start(self) 110 'daemonic processes are not allowed to have children' 111 _cleanup()--> 112 self._popen = self._Popen(self) 113 self._sentinel = self._popen.sentinel
114 # Avoid a refcycle if the target function holds an indirect
~\Anaconda3\envs\fastai-v1\lib\multiprocessing\context.py in _Popen(process_obj) 221 @staticmethod
222 def _Popen(process_obj):--> 223 return _default_context.get_context().Process._Popen(process_obj) 224
225 class DefaultContext(BaseContext):
~\Anaconda3\envs\fastai-v1\lib\multiprocessing\context.py in _Popen(process_obj) 320 def _Popen(process_obj): 321 from .popen_spawn_win32 import Popen
--> 322 return Popen(process_obj) 323
324 class SpawnContext(BaseContext):
~\Anaconda3\envs\fastai-v1\lib\multiprocessing\popen_spawn_win32.py in __init__(self, process_obj) 63 try: 64 reduction.dump(prep_data, to_child)---> 65 reduction.dump(process_obj, to_child) 66 finally: 67 set_spawning_popen(None)
~\Anaconda3\envs\fastai-v1\lib\multiprocessing\reduction.py in dump(obj, file, protocol) 58 def dump(obj, file, protocol=None): 59 '''Replacement for pickle.dump() using ForkingPickler.'''---> 60 ForkingPickler(file, protocol).dump(obj) 61
62 #
PicklingError: Can't pickle <function crop_pad at 0x000001F60EEF3D08>: it's not the same object as fastai.vision.transform.crop_pad