Giter Site home page Giter Site logo

wasr's People

Contributors

lojzezust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wasr's Issues

AttributeError: 'Trainer' object has no attribute 'log_dir'

Would you please let me know why the following error occur?

Best Regards

AttributeError: 'Trainer' object has no attribute 'log_dir'
(WASR) wkyoun@wkyoun-Bonobo-WS:~/다운로드/WaSR-masters$ python train.py --train_config configs/mastr1325_train.yaml --val_config configs/mastr1325_val.yaml --model_name my_wasr --validation --batch_size 2 --epochs 1
Namespace(batch_size=2, epochs=1, focal_loss_scale='labels', gpus=-1, learning_rate=1e-06, log_steps=20, lr_decay_pow=0.9, model='wasr_resnet101_imu', model_name='my_wasr', momentum=0.9, monitor_metric='val/iou/obstacle', monitor_metric_mode='max', no_augmentation=False, no_separation_loss=False, num_classes=3, output_dir='output', patience=None, precision=32, pretrained=True, pretrained_weights=None, random_seed=None, resume_from=None, separation_loss_lambda=0.01, train_config='configs/mastr1325_train.yaml', val_config='configs/mastr1325_val.yaml', validation=True, weight_decay=1e-06, workers=1)
No correct seed found, seed set to 3989317893
Traceback (most recent call last):
  File "train.py", line 159, in <module>
    main()
  File "train.py", line 155, in main
    train_wasr(args)
  File "train.py", line 143, in train_wasr
    precision=args.precision, log_dir="./log_dir")
  File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/connectors/env_vars_connector.py", line 41, in overwrite_by_env_vars
    return fn(self, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'log_dir'
(WASR) wkyoun@wkyoun-Bonobo-WS:~/다운로드/WaSR-masters$ python train.py --train_config configs/mastr1325_train.yaml --val_config configs/mastr1325_val.yaml --model_name my_wasr --validation --batch_size 2 --epochs 1
Namespace(batch_size=2, epochs=1, focal_loss_scale='labels', gpus=-1, learning_rate=1e-06, log_steps=20, lr_decay_pow=0.9, model='wasr_resnet101_imu', model_name='my_wasr', momentum=0.9, monitor_metric='val/iou/obstacle', monitor_metric_mode='max', no_augmentation=False, no_separation_loss=False, num_classes=3, output_dir='output', patience=None, precision=32, pretrained=True, pretrained_weights=None, random_seed=None, resume_from=None, separation_loss_lambda=0.01, train_config='configs/mastr1325_train.yaml', val_config='configs/mastr1325_val.yaml', validation=True, weight_decay=1e-06, workers=1)
No correct seed found, seed set to 2179451097
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1,2,3]
initializing ddp: GLOBAL_RANK: 0, MEMBER: 1/1

  | Name         | Type          | Params
-----------------------------------------------
0 | model        | WaSR          | 84 M  
1 | val_accuracy | PixelAccuracy | 0     
2 | val_iou_0    | ClassIoU      | 0     
3 | val_iou_1    | ClassIoU      | 0     
4 | val_iou_2    | ClassIoU      | 0     
INFO:lightning:
  | Name         | Type          | Params
-----------------------------------------------
0 | model        | WaSR          | 84 M  
1 | val_accuracy | PixelAccuracy | 0     
2 | val_iou_0    | ClassIoU      | 0     
3 | val_iou_1    | ClassIoU      | 0     
4 | val_iou_2    | ClassIoU      | 0     
/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, val dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 12 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  warnings.warn(*args, **kwargs)
Validation sanity check: 0it [00:00, ?it/s]/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/torchvision/transforms/functional.py:365: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
  "Argument interpolation should be of type InterpolationMode instead of int. "
/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, train dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 12 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  warnings.warn(*args, **kwargs)
Epoch 0:   0%|                                           | 0/37 [00:00<?, ?it/s][W reducer.cpp:1050] Warning: find_unused_parameters=True was specified in DDP constructor, but did not find any unused parameters. This flag results in an extra traversal of the autograd graph every iteration, which can adversely affect performance. If your model indeed never has any unused parameters, consider turning this flag off. Note that this warning may be a false positive your model has flow control causing later iterations to have unused parameters. (function operator())
Epoch 0: 100%|████████████| 37/37 [00:46<00:00,  1.27s/it, loss=0.166, v_num=55Saving latest checkpoint...                                                      
INFO:lightning:Saving latest checkpoint...
Epoch 0: 100%|████████████| 37/37 [00:46<00:00,  1.27s/it, loss=0.166, v_num=55]
Traceback (most recent call last):
  File "train.py", line 159, in <module>
    main()
  File "train.py", line 155, in main
    train_wasr(args)
  File "train.py", line 148, in train_wasr
    trainer.fit(model, train_dl, val_dl) #, log_dir)
  File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 451, in fit
    self.call_hook('on_fit_end')
  File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 833, in call_hook
    trainer_hook(*args, **kwargs)
  File "/home/wkyoun/anaconda3/envs/WASR/lib/python3.6/site-packages/pytorch_lightning/trainer/callback_hook.py", line 57, in on_fit_end
    callback.on_fit_end(self, self.get_model())
  File "/home/wkyoun/다운로드/WaSR-masters/wasr/utils.py", line 23, in on_fit_end
    export_path = os.path.join(trainer.log_dir, 'weights.pth')
AttributeError: 'Trainer' object has no attribute 'log_dir'

Prediction with IMU model

Hello,
I wanted to run predict.py with IMU model, so i followed tutorial in README.

python predict.py
--dataset_config configs/examples.yaml
--model wasr_resnet101_imu
--weights path/to/model/weights.pth
--output_dir output/predictions

But I met the error below.

Traceback (most recent call last):
File "/snap/pycharm-community/293/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "", line 1, in
File "/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "
/WaSR/wasr/models.py", line 63, in forward
features['imu_mask'] = x['imu_mask']
KeyError: 'imu_mask'

How can i fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.