When running python tools/run_net.py --cfg /home/ubuntu/slowfast/configs/AVA/c2/SLOWFAST_32x2_R101_50_50.yaml i am getting nan predictions in https://github.com/facebookresearch/SlowFast/blob/master/tools/demo_net.py#L242
Python version - 3.6.10 (on 3.7.7 didnt work too)
Pytorch - 1.5.1
Torchvision - 0.6.1
Cuda - 10.0
Detectron2 - 0.2
Here is config:
TRAIN:
ENABLE: False
DATASET: ava
BATCH_SIZE: 16
EVAL_PERIOD: 1
CHECKPOINT_PERIOD: 1
AUTO_RESUME: True
CHECKPOINT_FILE_PATH: "/home/ubuntu/SLOWFAST_32x2_R101_50_50.pkl"
CHECKPOINT_TYPE: pytorch
DATA:
NUM_FRAMES: 32
SAMPLING_RATE: 2
TRAIN_JITTER_SCALES: [256, 320]
TRAIN_CROP_SIZE: 224
TEST_CROP_SIZE: 256
INPUT_CHANNEL_NUM: [3, 3]
DETECTION:
ENABLE: True
ALIGNED: False
AVA:
BGR: False
DETECTION_SCORE_THRESH: 0.8
TEST_PREDICT_BOX_LISTS: ["person_box_67091280_iou90/ava_detection_val_boxes_and_labels.csv"]
SLOWFAST:
ALPHA: 4
BETA_INV: 8
FUSION_CONV_CHANNEL_RATIO: 2
FUSION_KERNEL_SZ: 5
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, 3], [4, 4], [6, 6], [3, 3]]
SPATIAL_DILATIONS: [[1, 1], [1, 1], [1, 1], [2, 2]]
SPATIAL_STRIDES: [[1, 1], [2, 2], [2, 2], [1, 1]]
NONLOCAL:
LOCATION: [[[], []], [[], []], [[6, 13, 20], []], [[], []]]
GROUP: [[1, 1], [1, 1], [1, 1], [1, 1]]
INSTANTIATION: dot_product
POOL: [[[2, 2, 2], [2, 2, 2]], [[2, 2, 2], [2, 2, 2]], [[2, 2, 2], [2, 2, 2]], [[2, 2, 2], [2, 2, 2]]]
BN:
USE_PRECISE_STATS: False
NUM_BATCHES_PRECISE: 200
SOLVER:
MOMENTUM: 0.9
WEIGHT_DECAY: 1e-7
OPTIMIZING_METHOD: sgd
MODEL:
NUM_CLASSES: 80
ARCH: slowfast
MODEL_NAME: SlowFast
LOSS_FUNC: bce
DROPOUT_RATE: 0.5
HEAD_ACT: sigmoid
TEST:
ENABLE: False
DATASET: ava
BATCH_SIZE: 8
DATA_LOADER:
NUM_WORKERS: 2
PIN_MEMORY: True
DEMO:
ENABLE: True
LABEL_FILE_PATH: "./demo/AVA/ava.names"
DATA_SOURCE: "/home/ubuntu/gestures_dataset_right_wave_15.mp4"
DISPLAY_WIDTH: 640
DISPLAY_HEIGHT: 480
DETECTRON2_OBJECT_DETECTION_MODEL_CFG: "COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml"
DETECTRON2_OBJECT_DETECTION_MODEL_WEIGHTS: "detectron2://COCO-Detection/faster_rcnn_R_50_FPN_3x/137849458/model_final_280758.pkl"
NUM_GPUS: 1
NUM_SHARDS: 1
RNG_SEED: 0
OUTPUT_DIR: .
And here is part of logs:
/home/ubuntu/slowfast/slowfast/models/head_helper.py:111: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert out.shape[2] == 1
/home/ubuntu/detectron2_repo/detectron2/layers/roi_align.py:105: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert rois.dim() == 2 and rois.size(1) == 5
/home/ubuntu/slowfast/slowfast/models/head_helper.py:111: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert out.shape[2] == 1
/home/ubuntu/detectron2_repo/detectron2/layers/roi_align.py:105: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert rois.dim() == 2 and rois.size(1) == 5
[WARNING: flop_count.py: 63]: Skipped operation aten::batch_norm 215 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::batch_norm 215 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::relu_ 204 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::relu_ 204 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::max_pool3d 7 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::max_pool3d 7 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::add 69 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::add 69 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::div 3 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::div 3 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::avg_pool3d 2 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::avg_pool3d 2 time(s)
[WARNING: flop_count.py: 63]: Skipped operation prim::PythonOp 2 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation prim::PythonOp 2 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::max_pool2d 2 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::max_pool2d 2 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::dropout 1 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::dropout 1 time(s)
[WARNING: flop_count.py: 63]: Skipped operation aten::sigmoid 1 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.flop_count: 63: Skipped operation aten::sigmoid 1 time(s)
[INFO: misc.py: 160]: Flops: 146.54916608 G
[07/11 21:40:19][INFO] slowfast.utils.misc: 160: Flops: 146.54916608 G
[WARNING: activation_count.py: 54]: Skipped operation aten::batch_norm 215 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::batch_norm 215 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::relu_ 204 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::relu_ 204 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::max_pool3d 7 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::max_pool3d 7 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::add 69 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::add 69 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::einsum 6 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::einsum 6 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::div 3 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::div 3 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::avg_pool3d 2 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::avg_pool3d 2 time(s)
[WARNING: activation_count.py: 54]: Skipped operation prim::PythonOp 2 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation prim::PythonOp 2 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::max_pool2d 2 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::max_pool2d 2 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::dropout 1 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::dropout 1 time(s)
[WARNING: activation_count.py: 54]: Skipped operation aten::sigmoid 1 time(s)
[07/11 21:40:19][WARNING] fvcore.nn.activation_count: 54: Skipped operation aten::sigmoid 1 time(s)
[INFO: misc.py: 165]: Activations: 293.60136 M
[07/11 21:40:19][INFO] slowfast.utils.misc: 165: Activations: 293.60136 M
[INFO: misc.py: 168]: nvidia-smi
[07/11 21:40:19][INFO] slowfast.utils.misc: 168: nvidia-smi
Please feel free to ask any additional information if needed.
question