Home>

Clone InstaGAN and try it now.

Error message

I'm learning a model. ↓

python train.py --dataroot ./datasets/jeans2skirt_ccp --model insta_gan --name jeans2skirt_ccp_instagan --loadSizeH 330 --loadSizeW 220 --fineSizeH 300 --fineSizeW 200 --niter 400 --niter_decay 200


As far as the output value is concerned, it seems to learn600epoch, but it takes 160 seconds per epoch.

Because I use Pytorch as a famous library, I checked whether I can use GPU well.
As a hit site&code,
Part 1

import torch
print (torch.cuda.is_available ())
torch.cuda.get_device_name (0)


Part 2

import torch
x = torch.randn (10)
y = torch.randn (10)
x = x.to ('cuda')
y = y.to ('cuda: 0') # After cuda: Use the GPU that supports numbers
z = x * y
z = z.to ('cpu') # to cpu
print (x.is_cuda) # True if the variable is on the GPU


In both cases, the result is that the GPU is recognized.

Since it's too slow, it seems like "Is it a CPU other than pytorch?"
If i have any thoughts, thank you.

Supplemental information (FW/tool version etc.)

Spec
windows10 + anaconda
GTX1080ti

# Name Version Build Channel
attrs 19.3.0 py_0
backcall 0.1.0 py36_0
blas 1.0 mkl
bleach 3.1.0 py36_0
ca-certificates 2019.10.16 0
certifi 2019.9.11 py36_0
cffi 1.13.0 py36h7a1dbc1_0chardet 3.0.4 pypi_0 pypi
colorama 0.4.1 py36_0
cuda90 1.0 0 pytorch
cudatoolkit 9.0 1
cycler 0.10.0 py36h009560c_0
cython 0.29.13 pypi_0 pypi
decorator 4.4.0 py36_1
defusedxml 0.6.0 py_0
dominate 2.4.0 pypi_0 pypi
entrypoints 0.3 py36_0
freetype 2.9.1 ha9979f8_1
icc_rt 2019.0.0 h0cc432a_1
icu 64.2 he025d50_1 conda-forge
idna 2.8 pypi_0 pypi
importlib_metadata 0.23 py36_0
intel-openmp 2019.4 245
ipykernel 5.1.2 py36h39e3cac_0
ipython 7.8.0 py36h39e3cac_0
ipython_genutils 0.2.0 py36h3c5d0ee_0
jedi 0.15.1 py36_0
jinja2 2.10.3 py_0
jpeg 9c hfa6e2cd_1001 conda-forge
jsonpatch 1.24 pypi_0 pypi
jsonpointer 2.0 pypi_0 pypi
jsonschema 3.1.1 py36_0
jupyter_client 5.3.4 py36_0
jupyter_core 4.6.0 py36_0
kiwisolver 1.1.0 py36ha925a31_0
libblas 3.8.0 14_mkl conda-forge
libcblas 3.8.0 14_mkl conda-forge
libclang 9.0.0 h74a9793_1 conda-forge
liblapack 3.8.0 14_mkl conda-forge
liblapacke 3.8.0 14_mkl conda-forge
libpng 1.6.37 h2a8f88b_0
libsodium 1.0.16 h9d3ae62_0
libtiff 4.0.10 hb898794_2
libwebp 1.0.2 hfa6e2cd_2 conda-forge
m2w64-gcc-libgfortran 5.3.0 6
m2w64-gcc-libs 5.3.0 7
m2w64-gcc-libs-core 5.3.0 7m2w64-gmp 6.1.0 2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2
markupsafe 1.1.1 py36he774522_0
matplotlib 3.1.1 py36_1 conda-forge
matplotlib-base 3.1.1 py36h2852a4a_1 conda-forge
mistune 0.8.4 py36he774522_0
mkl 2019.4 245
mkl-service 2.3.0 py36hb782905_0
mkl_fft 1.0.14 py36h14836fe_0
mkl_random 1.1.0 py36h675688f_0
more-itertools 7.2.0 py36_0
msys2-conda-epoch 20160418 1
nbconvert 5.6.0 py36_1
nbformat 4.4.0 py36h3a5bc1b_0
ninja 1.9.0 py36h74a9793_0
notebook 6.0.1 py36_0
numpy 1.16.5 py36h19fb1c0_0
numpy-base 1.16.5 py36hc3f5095_0
olefile 0.46 py36_0
opencv 4.1.1 py36he03da11_2 conda-forge
openssl 1.1.1d he774522_3
pandoc 2.2.3.2 0
pandocfilters 1.4.2 py36_1
parso 0.5.1 py_0
pickleshare 0.7.5 py36_0
pillow 6.2.0 py36hdc69c19_0
pip 19.3.1 py36_0
prometheus_client 0.7.1 py_0
prompt_toolkit 2.0.10 py_0
pycocotools 2.0 pypi_0 pypi
pycparser 2.19 py36_0
pygments 2.4.2 py_0
pyparsing 2.4.2 py_0
pyqt 5.12.3 py36h6538335_0 conda-forge
pyqt5-sip 4.19.18 pypi_0 pypi
pyqtwebengine 5.12.1 pypi_0 pypi
pyrsistent 0.15.4 py36he774522_0
python 3.6.9 h5500b2f_0
python-dateutil 2.8.0 py36_0
pytorch 0.4.1 py36_cuda90_cudnn7he774522_1 pytorchpytz 2019.3 py_0
pywin32 223 py36hfa6e2cd_1
pywinpty 0.5.5 py36_1000
pyzmq 18.1.0 pypi_0 pypi
qt 5.12.5 h7ef1ec2_0 conda-forge
requests 2.22.0 pypi_0 pypi
scipy 1.1.0 pypi_0 pypi
send2trash 1.5.0 py36_0
setuptools 41.4.0 py36_0
sip 4.19.8 py36h6538335_0
six 1.12.0 py36_0
sqlite 3.30.1 he774522_0
terminado 0.8.2 py36_0
testpath 0.4.2 py36_0
tk 8.6.8 hfa6e2cd_0
torch 0.4.1 pypi_0 pypi
torchfile 0.1.0 pypi_0 pypi
torchvision 0.2.1 py_2 soumith
tornado 6.0.3 py36he774522_0
tqdm 4.36.1 py_0
traitlets 4.3.3 py36_0
urllib3 1.25.6 pypi_0 pypi
vc 14.1 h0510ff6_4
visdom 0.1.8.9 pypi_0 pypi
vs2015_runtime 14.16.27012 hf0eaf9b_0
wcwidth 0.1.7 py36h3d5aa90_0
webencodings 0.5.1 py36_1
websocket-client 0.56.0 pypi_0 pypi
wheel 0.33.6 py36_0
wincertstore 0.2 py36h7fe50ca_0
winpty 0.4.3 4
xz 5.2.4 h2fa13f4_4
zeromq 4.3.1 h33f27b4_3
zipp 0.6.0 py_0
zlib 1.2.11 h62dcd97_3
zstd 1.3.7 h508b16e_0
  • Answer # 1

    How about monitoring the consumption of GPU memory?
    If the memory is not used at all, it is suspicious, and conversely, if it is full, there is a concern that the speed will decrease.
    After that, try increasing the CUDA version or putting in CUDNN. Newer is faster.

    At first glance, I'm curious that CUDNN doesn't seem to be in.

  • Answer # 2

    The GPU was not selected (should it be processed by the CPU?), but the processing time was clearly slowed.
    From this, I decided that the GPU was working.