I downloaded the citys dataset and put it in home/user/.encoding/data.
Then, I run command 'CUDA_VISIBLE_DEVICES=0,1 python train.py --dataset citys \
--model deeplab --jpu --aux \
--backbone resnet50 --checkname deeplab_res50_citys'
and the issue come out:
Traceback (most recent call last):
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 576, in _build_extension_module
['ninja', '-v'], stderr=subprocess.STDOUT, cwd=build_directory)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 16, in
import encoding.utils as utils
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/init.py", line 13, in
from . import nn, functions, dilated, parallel, utils, models, datasets
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/nn/init.py", line 12, in
from .syncbn import
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/nn/syncbn.py", line 23, in
from ..functions import
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/functions/init.py", line 2, in
from .syncbn import *
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/functions/syncbn.py", line 13, in
from .. import lib
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/init.py", line 14, in
], build_directory=cpu_path, verbose=False)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 501, in load
_build_extension_module(name, build_directory)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 582, in _build_extension_module
name, error.output.decode()))
RuntimeError: Error building extension 'enclib_cpu': [1/2] c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I/home/weizhaoxiang/anaconda3/envs/pytorch/include/python3.6m -fPIC -std=c++11 -c /home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o
FAILED: syncbn_cpu.o
c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I/home/weizhaoxiang/anaconda3/envs/pytorch/include/python3.6m -fPIC -std=c++11 -c /home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o
/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp:1:29: fatal error: torch/extension.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.
I downloaded the citys dataset and put it in home/user/.encoding/data. Then, I run command 'CUDA_VISIBLE_DEVICES=0,1 python train.py --dataset citys \ --model deeplab --jpu --aux \ --backbone resnet50 --checkname deeplab_res50_citys' and the issue come out:
Traceback (most recent call last): File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 576, in _build_extension_module ['ninja', '-v'], stderr=subprocess.STDOUT, cwd=build_directory) File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "train.py", line 16, in
import encoding.utils as utils
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/init.py", line 13, in
from . import nn, functions, dilated, parallel, utils, models, datasets
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/nn/init.py", line 12, in
from .syncbn import
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/nn/syncbn.py", line 23, in
from ..functions import
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/functions/init.py", line 2, in
from .syncbn import *
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/functions/syncbn.py", line 13, in
from .. import lib
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/init.py", line 14, in
], build_directory=cpu_path, verbose=False)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 501, in load
_build_extension_module(name, build_directory)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 582, in _build_extension_module
name, error.output.decode()))
RuntimeError: Error building extension 'enclib_cpu': [1/2] c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I/home/weizhaoxiang/anaconda3/envs/pytorch/include/python3.6m -fPIC -std=c++11 -c /home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o
FAILED: syncbn_cpu.o
c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I/home/weizhaoxiang/anaconda3/envs/pytorch/include/python3.6m -fPIC -std=c++11 -c /home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o
/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp:1:29: fatal error: torch/extension.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.
How to solve this problem??