PointCNN Environmental configuration

2630
12
Jump to solution
03-29-2020 02:51 AM
REDSUN
by
New Contributor III

 ESRI engineer, what is the configuration of pointcnn model environment mentioned in the developer conference? I will install api1.8, and prompt that you need to install torch geometry, torch spline conv, PIP install torch cluster, torch sparse, and torch scatter. The official advice of installing torch is to install torch 1.4, but it still reports an error。

0 Kudos
1 Solution

Accepted Solutions
AbhishekPandey
New Contributor II

use Change LAS Class Codes—Help | Documentation  tool. 

previously my classes were like this:

but then I changed them to this 

in ur case class 0,1,2 will remain same but change class 6 to 3 and class 11 to 4

View solution in original post

0 Kudos
12 Replies
AbhishekPandey
New Contributor II

I was facing the same problem but here's a solution. open arcgis python command prompt, type "jupyter notebook" create a new notebook and carry out ur training in that. 

0 Kudos
REDSUN
by
New Contributor III

Hello, now that I have solved this problem, it seems that there are new problems

---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\basic_train.py in fit(epochs, learn, callbacks, metrics)
100 xb, yb = cb_handler.on_batch_begin(xb, yb)
--> 101 loss = loss_batch(learn.model, xb, yb, learn.loss_func, learn.opt, cb_handler)
102 if cb_handler.on_batch_end(loss): break

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\basic_train.py in loss_batch(model, xb, yb, loss_func, opt, cb_handler)
32 if opt is not None:
---> 33 loss,skip_bwd = cb_handler.on_backward_begin(loss)
34 if not skip_bwd: loss.backward()

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\callback.py in on_backward_begin(self, loss)
289 "Handle gradient calculation on `loss`."
--> 290 self.smoothener.add_value(loss.detach().cpu())
291 self.state_dict['last_loss'], self.state_dict['smooth_loss'] = loss, self.smoothener.smooth

RuntimeError: CUDA error: device-side assert triggered

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
<ipython-input-7-1d9bc8b090e2> in <module>
----> 1 model.lr_find()

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\arcgis\learn\models\_arcgis_model.py in lr_find(self, allow_plot)
294 self._check_requisites()
295
--> 296 self.learn.lr_find()
297 from IPython.display import clear_output
298 clear_output()

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\train.py in lr_find(learn, start_lr, end_lr, num_it, stop_div, wd)
30 cb = LRFinder(learn, start_lr, end_lr, num_it, stop_div)
31 epochs = int(np.ceil(num_it/len(learn.data.train_dl)))
---> 32 learn.fit(epochs, start_lr, callbacks=[cb], wd=wd)
33
34 def to_fp16(learn:Learner, loss_scale:float=None, max_noskip:int=1000, dynamic:bool=True, clip:float=None,

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\basic_train.py in fit(self, epochs, lr, wd, callbacks)
198 callbacks = [cb(self) for cb in self.callback_fns + listify(defaults.extra_callback_fns)] + listify(callbacks)
199 if defaults.extra_callbacks is not None: callbacks += defaults.extra_callbacks
--> 200 fit(epochs, self, metrics=self.metrics, callbacks=self.callbacks+callbacks)
201
202 def create_opt(self, lr:Floats, wd:Floats=0.)->None:

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\basic_train.py in fit(epochs, learn, callbacks, metrics)
110 exception = e
111 raise
--> 112 finally: cb_handler.on_train_end(exception)
113
114 loss_func_name2activ = {'cross_entropy_loss': F.softmax, 'nll_loss': torch.exp, 'poisson_nll_loss': torch.exp,

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\callback.py in on_train_end(self, exception)
321 def on_train_end(self, exception:Union[bool,Exception])->None:
322 "Handle end of training, `exception` is an `Exception` or False if no exceptions during training."
--> 323 self('train_end', exception=exception)
324
325 @property

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\callback.py in __call__(self, cb_name, call_mets, **kwargs)
249 if call_mets:
250 for met in self.metrics: self._call_and_update(met, cb_name, **kwargs)
--> 251 for cb in self.callbacks: self._call_and_update(cb, cb_name, **kwargs)
252
253 def set_dl(self, dl:DataLoader):

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\callback.py in _call_and_update(self, cb, cb_name, **kwargs)
239 def _call_and_update(self, cb, cb_name, **kwargs)->None:
240 "Call `cb_name` on `cb` and update the inner state."
--> 241 new = ifnone(getattr(cb, f'on_{cb_name}')(**self.state_dict, **kwargs), dict())
242 for k,v in new.items():
243 if k not in self.state_dict:

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\callbacks\lr_finder.py in on_train_end(self, **kwargs)
33 def on_train_end(self, **kwargs:Any)->None:
34 "Cleanup learn model weights disturbed during LRFinder exploration."
---> 35 self.learn.load('tmp', purge=False)
36 if hasattr(self.learn.model, 'reset'): self.learn.model.reset()
37 for cb in self.callbacks:

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\fastai\basic_train.py in load(self, file, device, strict, with_opt, purge, remove_module)
265 elif isinstance(device, int): device = torch.device('cuda', device)
266 source = self.path/self.model_dir/f'{file}.pth' if is_pathlike(file) else file
--> 267 state = torch.load(source, map_location=device)
268 if set(state.keys()) == {'model', 'opt'}:
269 model_state = state['model']

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\torch\serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
385 f = f.open('rb')
386 try:
--> 387 return _load(f, map_location, pickle_module, **pickle_load_args)
388 finally:
389 if new_fd:

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\torch\serialization.py in _load(f, map_location, pickle_module, **pickle_load_args)
572 unpickler = pickle_module.Unpickler(f, **pickle_load_args)
573 unpickler.persistent_load = persistent_load
--> 574 result = unpickler.load()
575
576 deserialized_storage_keys = pickle_module.load(f, **pickle_load_args)

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\torch\_utils.py in _rebuild_tensor_v2(storage, storage_offset, size, stride, requires_grad, backward_hooks)
131
132 def _rebuild_tensor_v2(storage, storage_offset, size, stride, requires_grad, backward_hooks):
--> 133 tensor = _rebuild_tensor(storage, storage_offset, size, stride)
134 tensor.requires_grad = requires_grad
135 # NB: This line exists only for backwards compatibility; the

~\AppData\Local\ESRI\conda\envs\pytorcharcgis\lib\site-packages\torch\_utils.py in _rebuild_tensor(storage, storage_offset, size, stride)
126 def _rebuild_tensor(storage, storage_offset, size, stride):
127 # first construct a tensor with the correct dtype/device
--> 128 t = torch.tensor([], dtype=storage.dtype, device=storage.device)
129 return t.set_(storage, storage_offset, size, stride)
130

RuntimeError: CUDA error: device-side assert triggered

0 Kudos
AbhishekPandey
New Contributor II
0 Kudos
REDSUN
by
New Contributor III

Thank you. I'll try

0 Kudos
REDSUN
by
New Contributor III

I marked it again,Check ur data classes, but the test results are not continuous. How can they be continuous

0 Kudos
AbhishekPandey
New Contributor II

use Change LAS Class Codes—Help | Documentation  tool. 

previously my classes were like this:

but then I changed them to this 

in ur case class 0,1,2 will remain same but change class 6 to 3 and class 11 to 4

0 Kudos
REDSUN
by
New Contributor III

Thank you for the perfect solution

REDSUN
by
New Contributor III

How long do you expect the point cloud classification to take?

No Las file in the results folder

0 Kudos
AbhishekPandey
New Contributor II

Depends on the GPU you have. since how long has it been running?

also I hope u r following arcgis.learn module — arcgis 1.8.0 documentation 

0 Kudos