facebookresearch / facebookresearch/SlowFast

Errors while training models on AVA

Open
#293 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to train I3D_NLN on AVA data set I created my own config file:

`TRAIN:
ENABLE: True
DATASET: ava
BATCH_SIZE: 64
EVAL_PERIOD: 5
CHECKPOINT_PERIOD: 1
AUTO_RESUME: False
DATA:
NUM_FRAMES: 4
SAMPLING_RATE: 16
TRAIN_JITTER_SCALES: [256, 320]
TRAIN_CROP_SIZE: 224
TEST_CROP_SIZE: 256
INPUT_CHANNEL_NUM: [3]
DETECTION:
ENABLE: True
ALIGNED: True
AVA:
DETECTION_SCORE_THRESH: 0.9
TRAIN_PREDICT_BOX_LISTS: [
"ava_train_v2.2.csv",
"person_box_67091280_iou90/ava_detection_train_boxes_and_labels_include_negative_v2.2.csv",
]
TEST_PREDICT_BOX_LISTS: ["person_box_67091280_iou90/ava_detection_val_boxes_and_labels.csv"]
RESNET:
ZERO_INIT_FINAL_BN: True
WIDTH_PER_GROUP: 64
NUM_GROUPS: 1
DEPTH: 101
TRANS_FUNC: bottleneck_transform
STRIDE_1X1: False
NUM_BLOCK_TEMP_KERNEL: [[3], [4], [23], [3]]
NONLOCAL:
LOCATION: [[[]], [[1, 3]], [[1, 3, 5]], [[]]]
GROUP: [[1], [1], [1], [1]]
INSTANTIATION: softmax
BN:
USE_PRECISE_STATS: True
NUM_BATCHES_PRECISE: 200
SOLVER:
BASE_LR: 0.1
LR_POLICY: cosine
MAX_EPOCH: 196
MOMENTUM: 0.9
WEIGHT_DECAY: 1e-4
WARMUP_EPOCHS: 34.0
WARMUP_START_LR: 0.01
OPTIMIZING_METHOD: sgd
MODEL:
NUM_CLASSES: 80
ARCH: i3d
MODEL_NAME: ResNet
LOSS_FUNC: bce
DROPOUT_RATE: 0.5
HEAD_ACT: sigmoid
TEST:
ENABLE: True
DATASET: ava
BATCH_SIZE: 64
DATA_LOADER:
NUM_WORKERS: 8
PIN_MEMORY: True
NUM_GPUS: 1
NUM_SHARDS: 1
RNG_SEED: 0
OUTPUT_DIR: .
`
I'm running the next script:

python tools/run_net.py --cfg configs/AVA/I3D_NLN_8x8_R101.yaml DATA.PATH_TO_DATA_DIR ../video-long-term-feature-banks/data/ava/ TRAIN.ENABLE True NUM_GPUS 1 TRAIN.BATCH_SIZE 8

I'm getting the next error:

Traceback (most recent call last):
File "tools/run_net.py", line 42, in
main()
File "tools/run_net.py", line 23, in main
launch_job(cfg=cfg, init_method=args.init_method, func=train)
File "/home/ubuntu/SlowFast/slowfast/utils/misc.py", line 296, in launch_job
func(cfg=cfg)
File "/home/ubuntu/SlowFast/tools/train_net.py", line 474, in train
cfg.NUM_GPUS > 0,
File "/home/ubuntu/SlowFast/tools/train_net.py", line 305, in calculate_and_update_precise_bn
update_bn_stats(model, _gen_loader(), num_iters)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 49, in decorate_no_grad
return func(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/fvcore/nn/precise_bn.py", line 74, in update_bn_stats
model(inputs)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/home/ubuntu/SlowFast/slowfast/models/video_model_builder.py", line 597, in forward
x = self.head(x, bboxes)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/home/ubuntu/SlowFast/slowfast/models/head_helper.py", line 115, in forward
out = roi_align(out, bboxes)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/home/ubuntu/detectron2_repo/detectron2/layers/roi_align.py", line 105, in forward
assert rois.dim() == 2 and rois.size(1) == 5
AttributeError: 'NoneType' object has no attribute 'dim'

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.