lightaime / deep_gcns_torch

Pytorch Repo for DeepGCNs (ICCV'2019 Oral, TPAMI'2021), DeeperGCN (arXiv'2020) and GNN1000(ICML'2021): https://www.deepgcns.org
MIT License
1.13k stars 155 forks source link

Question about dataset. #81

Closed jiaruHithub closed 3 years ago

jiaruHithub commented 3 years ago

When I run the code:

root@e62eeb3b75c5:/home/deep_gcns_torch-master/deep_gcns_torch-master# CUDA_VISIBLE_DEVICES=0,1 python examples/sem_seg_sparse/train.py  --multi_gpus --phase train --train_path /data/deepgcn/S3DIS
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
tensorflow is not installed.
usage: train.py [-h] [--phase PHASE] [--use_cpu] [--exp_name EXP_NAME]
                [--root_dir ROOT_DIR] [--data_dir DATA_DIR]
                [--batch_size BATCH_SIZE] [--in_channels IN_CHANNELS]
                [--total_epochs TOTAL_EPOCHS] [--save_freq SAVE_FREQ]
                [--iter ITER] [--lr_adjust_freq LR_ADJUST_FREQ] [--lr LR]
                [--lr_decay_rate LR_DECAY_RATE] [--print_freq PRINT_FREQ]
                [--postname POSTNAME] [--multi_gpus] [--seed SEED]
                [--no_clutter] [--pretrained_model PRETRAINED_MODEL] [--k K]
                [--block BLOCK] [--conv CONV] [--act ACT] [--norm NORM]
                [--bias BIAS] [--n_filters N_FILTERS] [--n_blocks N_BLOCKS]
                [--dropout DROPOUT] [--epsilon EPSILON]
                [--stochastic STOCHASTIC]
train.py: error: unrecognized arguments: --train_path /data/deepgcn/S3DIS

I can't handle this error, nor can I change the directory --data_dir. I try to put the downloaded zip into it, but the following error is displayed:

                [--root_dir ROOT_DIR] [--data_dir DATA_DIR]
                [--batch_size BATCH_SIZE] [--in_channels IN_CHANNELS]
                [--total_epochs TOTAL_EPOCHS] [--save_freq SAVE_FREQ]
                [--iter ITER] [--lr_adjust_freq LR_ADJUST_FREQ] [--lr LR]
                [--lr_decay_rate LR_DECAY_RATE] [--print_freq PRINT_FREQ]
                [--postname POSTNAME] [--multi_gpus] [--seed SEED]
                [--no_clutter] [--pretrained_model PRETRAINED_MODEL] [--k K]
                [--block BLOCK] [--conv CONV] [--act ACT] [--norm NORM]
                [--bias BIAS] [--n_filters N_FILTERS] [--n_blocks N_BLOCKS]
                [--dropout DROPOUT] [--epsilon EPSILON]
                [--stochastic STOCHASTIC]
train.py: error: unrecognized arguments: ----data_dir /data/deepgcn/S3DIS
root@e62eeb3b75c5:/home/ggbond/deep_gcns_torch-master/deep_gcns_torch-master# CUDA_VISIBLE_DEVICES=3,4 python examples/sem_seg_sparse/train.py  --multi_gpus --phase train --data_dir /data/deepgcn/S3DIS
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/opt/conda/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
tensorflow is not installed.
2021-02-09 05:52:05,148 saving log, checkpoint and back up code in folder: log/sem_seg_sparse-res-edge-n28-C64-k16-drop0.3-lr0.001_B16_20210209-055205_f660a4fa-88d0-41bc-9dfa-d21ab4889f75
2021-02-09 05:52:05,148 ==========       args      =============
2021-02-09 05:52:05,148 phase:train
2021-02-09 05:52:05,149 use_cpu:False
2021-02-09 05:52:05,149 exp_name:sem_seg_sparse
2021-02-09 05:52:05,149 root_dir:log
2021-02-09 05:52:05,149 data_dir:/data/deepgcn/S3DIS
2021-02-09 05:52:05,149 batch_size:16
2021-02-09 05:52:05,150 in_channels:9
2021-02-09 05:52:05,150 total_epochs:100
2021-02-09 05:52:05,150 save_freq:1
2021-02-09 05:52:05,150 iter:0
2021-02-09 05:52:05,150 lr_adjust_freq:20
2021-02-09 05:52:05,150 lr:0.001
2021-02-09 05:52:05,151 lr_decay_rate:0.5
2021-02-09 05:52:05,151 print_freq:100
2021-02-09 05:52:05,151 postname:
2021-02-09 05:52:05,151 multi_gpus:True
2021-02-09 05:52:05,151 seed:0
2021-02-09 05:52:05,151 no_clutter:False
2021-02-09 05:52:05,151 pretrained_model:
2021-02-09 05:52:05,152 k:16
2021-02-09 05:52:05,152 block:res
2021-02-09 05:52:05,152 conv:edge
2021-02-09 05:52:05,152 act:relu
2021-02-09 05:52:05,152 norm:batch
2021-02-09 05:52:05,152 bias:True
2021-02-09 05:52:05,153 n_filters:64
2021-02-09 05:52:05,153 n_blocks:28
2021-02-09 05:52:05,153 dropout:0.3
2021-02-09 05:52:05,153 epsilon:0.2
2021-02-09 05:52:05,153 stochastic:True
2021-02-09 05:52:05,153 device:cuda
2021-02-09 05:52:05,154 jobname:sem_seg_sparse-res-edge-n28-C64-k16-drop0.3-lr0.001_B16
2021-02-09 05:52:05,154 exp_dir:log/sem_seg_sparse-res-edge-n28-C64-k16-drop0.3-lr0.001_B16_20210209-055205_f660a4fa-88d0-41bc-9dfa-d21ab4889f75
2021-02-09 05:52:05,154 ckpt_dir:log/sem_seg_sparse-res-edge-n28-C64-k16-drop0.3-lr0.001_B16_20210209-055205_f660a4fa-88d0-41bc-9dfa-d21ab4889f75/checkpoint
2021-02-09 05:52:05,154 code_dir:log/sem_seg_sparse-res-edge-n28-C64-k16-drop0.3-lr0.001_B16_20210209-055205_f660a4fa-88d0-41bc-9dfa-d21ab4889f75/code
2021-02-09 05:52:05,154 writer:<torch.utils.tensorboard.writer.SummaryWriter object at 0x7f73c762b750>
2021-02-09 05:52:05,154 epoch:-1
2021-02-09 05:52:05,155 step:-1
2021-02-09 05:52:05,155 loglevel:info
2021-02-09 05:52:05,155 ==========     args END    =============
2021-02-09 05:52:05,155

2021-02-09 05:52:05,155 ===> Phase is train.
2021-02-09 05:52:05,155 ===> Creating dataloader ...
Using exist file indoor3d_sem_seg_hdf5_data.zip
Extracting /data/deepgcn/S3DIS/indoor3d_sem_seg_hdf5_data.zip
Traceback (most recent call last):
  File "examples/sem_seg_sparse/train.py", line 129, in <module>
    main()
  File "examples/sem_seg_sparse/train.py", line 20, in main
    train_dataset = GeoData.S3DIS(opt.data_dir, test_area=5, train=True, pre_transform=T.NormalizeScale())
  File "/opt/conda/lib/python3.7/site-packages/torch_geometric/datasets/s3dis.py", line 50, in __init__
    super(S3DIS, self).__init__(root, transform, pre_transform, pre_filter)
  File "/opt/conda/lib/python3.7/site-packages/torch_geometric/data/in_memory_dataset.py", line 54, in __init__
    pre_filter)
  File "/opt/conda/lib/python3.7/site-packages/torch_geometric/data/dataset.py", line 90, in __init__
    self._download()
  File "/opt/conda/lib/python3.7/site-packages/torch_geometric/data/dataset.py", line 142, in _download
    self.download()
  File "/opt/conda/lib/python3.7/site-packages/torch_geometric/datasets/s3dis.py", line 65, in download
    extract_zip(path, self.root)
  File "/opt/conda/lib/python3.7/site-packages/torch_geometric/data/extract.py", line 40, in extract_zip
    with zipfile.ZipFile(path, 'r') as f:
  File "/opt/conda/lib/python3.7/zipfile.py", line 1258, in __init__
    self._RealGetContents()
  File "/opt/conda/lib/python3.7/zipfile.py", line 1325, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
guochengqian commented 3 years ago

hi @jiaruHithub , firstly, make sure you are using the latest code. Then, to your question,

  1. it should be --data_dir not --train_path
  2. make sure your /data/deepgcn/S3DIS/indoor3d_sem_seg_hdf5_data.zip file is not corrupted.