Giter Site home page Giter Site logo

wisconsinaivision / few-shot-gan-adaptation Goto Github PK

View Code? Open in Web Editor NEW
286.0 12.0 48.0 66.51 MB

[CVPR '21] Official repository for Few-shot Image Generation via Cross-domain Correspondence

Home Page: https://utkarshojha.github.io/few-shot-gan-adaptation/

License: Other

Python 79.18% C++ 1.81% Cuda 14.76% Shell 4.24%
computer-vision gans few-shot-learning

few-shot-gan-adaptation's Introduction

Few-shot Image Generation via Cross-domain Correspondence

Utkarsh Ojha, Yijun Li, Jingwan Lu, Alexei A. Efros, Yong Jae Lee, Eli Shechtman, Richard Zhang

Adobe Research, UC Davis, UC Berkeley

teaser

PyTorch implementation of adapting a source GAN (trained on a large dataset) to a target domain using very few images.

Overview

Our method helps adapt the source GAN where one-to-one correspondence is preserved between the source Gs(z) and target Gt(z) images.

Requirements

Note: The base model is taken from StyleGAN2's implementation from @rosinality

  • Linux
  • NVIDIA GPU + CUDA CuDNN 10.2
  • PyTorch 1.7.0
  • Python 3.6.9
  • Install all the libraries through pip install -r requirements.txt

Testing

We provide the pre-trained models for different source and adapted (target) GAN models.

Source GAN: Gs Target GAN: Gs→t
FFHQ [Sketches] [Caricatures] [Amedeo Modigliani] [Babies] [Sunglasses] [Rafael] [Otto Dix]
LSUN Church [Haunted houses] [Van Gogh houses [Landscapes] [Caricatures]
LSUN Cars [Wrecked cars] [Landscapes] [Haunted houses] [Caricatures]
LSUN Horses [Landscapes] [Caricatures] [Haunted houses]
Hand gestures [Google Maps] [Landscapes]

For now, we have only included the pre-trained models using FFHQ as the source domain, i.e. all the models in the first row. We will add the remaining ones soon.

Download the pre-trained model(s), and store it into ./checkpoints directory.

Sample images from a model

To generate images from a pre-trained GAN, run the following command:

CUDA_VISIBLE_DEVICES=0 python generate.py --ckpt_target /path/to/model/

Here, model_name follows the notation of source_target, e.g. ffhq_sketches. Use the --load_noise option to use the noise vectors used for some figures in the paper (Figures 1-4). For example:

CUDA_VISIBLE_DEVICES=0 python generate.py --ckpt_target ./checkpoints/ffhq_sketches.pt --load_noise noise.pt

This will save the images in the test_samples/ directory.

Visualizing correspondence results

To visualize the same noise in the source and adapted models, i.e. Gs(z) and Gs→t(z), run the following command(s):

# generate two image grids of 5x5 for source and target
CUDA_VISIBLE_DEVICES=0 python generate.py --ckpt_source /path/to/source --ckpt_target /path/to/target --load_noise noise.pt

# visualize the interpolations of source and target
CUDA_VISIBLE_DEVICES=0 python generate.py --ckpt_source /path/to/source --ckpt_target /path/to/source --load_noise noise.pt --mode interpolate
python traversal_gif.py 10
  • The second argument when running traversal_gif.py denotes the number of images you want to interpolate between.
  • --n_sample determines the number of images to be sampled (default set to 25).
  • --n_steps determines the number of steps taken when interpolating from G(z1) to G(z2) (default set to 40).
  • --mode option determines the visualization type: generating either the images or interpolation .gif.
  • The .gif file will be saved in gifs/ directory.

Hand gesture experiments

We collected images of random hand gestures being performed on a plain surface (~ 18k images), and used that as the data to train a source model (from scratch). We then adapted it to two different target domains; Landscape images and Google maps. The goal was to see if, during inference, interpolating the hand genstures can result in meaningful variations in the target images. Run the following commands to see the results:

CUDA_VISIBLE_DEVICES=0 python generate.py --ckpt_source /path/to/source --ckpt_target /path/to/maps(landscapes) --load_noise noise.pt --mode interpolate

Evaluating FID

The following table provides a link to the test set of domains used in Table 1:

Download, and unzip the set of images into your desired directory, and compute the FID score (taken from pytorch-fid) between the real (Rtest) and fake (F) images, by running the following command

python -m pytorch_fid /path/to/real/images /path/to/fake/images

Evaluating intra-cluster distance

Download the entire set of images from this link (1.1 GB), which are used for the results in Table 2. The organization of this collection is as follows:

cluster_centers
└── amedeo			# target domain -- will be from [amedeo, sketches]
    └── ours			# baseline -- will be from [tgan, tgan_ada, freezeD, ewc, ours]
        └── c0			# center id -- there will be 10 clusters [c0, c1 ... c9]
            ├── center.png	# cluster center -- this is one of the 10 training images used. Each cluster will have its own center
            │── img0.png   	# generated images which matched with this cluster's center, according to LPIPS metric.
            │── img1.png
            │      .
	    │      .
                   

Unzip the file, and then run the following command to compute the results for a baseline on a dataset:

CUDA_VISIBLE_DEVICES=0 python feat_cluster.py --baseline <baseline> --dataset <target_domain> --mode intra_cluster_dist

E.g.
CUDA_VISIBLE_DEVICES=0 python feat_cluster.py --baseline tgan --dataset sketches --mode intra_cluster_dist

We also provide the utility to visualize the closest and farthest members of a cluster, as shown in Figure 14 (shown below), using the following command:

CUDA_VISIBLE_DEVICES=0 python feat_cluster.py --baseline tgan --dataset sketches --mode visualize_members

The command will save the generated image which is closest/farthest to/from a center as closest.png/farthest.png respectively.

Training (adapting) your own GAN

Choose the source domain

  • Only the pre-trained model is needed, i.e. no need for access to the source data.
  • Refer to the first column of the pre-trained models table above.
  • If you wish to use some other source model, make sure that it follows the generator architecture defined in this pytorch implementation of StyleGAN2.

Choose the target domain

  • Below are the links to all the target domains, each consisting of 10 images, used in the paper.
Sketches Amedeo Modigliani Babies Sunglasses Rafael Otto Dix Haunted houses Van Gogh houses Landscapes Wrecked cars Maps
images images images images images images images images images images images
processed processed processed processed processed processed processed processed processed processed processed

Note We cannot share the images for the caricature domain due to license issues.

  • If downloading the raw images, unzip them into ./raw_data folder.

    • Run python prepare_data.py --out processed_data/<dataset_name> --size 256 ./raw_data/<dataset_name>
    • This will generate the processed version of the data in ./processed_data directory.
  • Otherwise, if downloading directly the processed files, unzip them into ./processed_data directory.

  • Set the training parameters in train.py:

    • --n_train should be set to the number of training samples (default is 10).
    • --img_freq and ckpt_freq control how frequently do the intermediate generated images and intermediate models are being saved respectively.
    • --iter determines the total number of iterations. In our experience, adapting a source GAN on FFHQ to artistic domains (e.g. Sketches/Amedeo's paintings) delivers decent results in 4k-5k iterations. For domains closer to natural faces (e.g. Babies/Sunglasses), we get the best results in about 1k iterations.
  • Run the following command to adapt the source GAN (e.g. FFHQ) to the target domain (e.g. sketches):

CUDA_VISIBLE_DEVICES=0 python train.py --ckpt_source /path/to/source_model --data_path /path/to/target_data --exp <exp_name>

# sample run
CUDA_VISIBLE_DEVICES=0 python train.py --ckpt_source ./checkpoints/source_ffhq.pt --data_path ./processed_data/sketches --exp ffhq_to_sketches    

This will create directories with name ffhq_to_sketches in ./checkpoints/ (saving the intermediate models) and in ./samples (saving the intermediate generated images).

Runnig the above code with default configurations, i.e. batch size = 4, will use ~20 GB GPU memory.

Bibtex

If you find our code useful, please cite our paper:

@inproceedings{ojha2021few-shot-gan,
  title={Few-shot Image Generation via Cross-domain Correspondence},
  author={Ojha, Utkarsh and Li, Yijun and Lu, Cynthia and Efros, Alexei A. and Lee, Yong Jae and Shechtman, Eli and Zhang, Richard},
  booktitle={CVPR},
  year={2021}
}

Acknowledgment

As mentioned before, the StyleGAN2 model is borrowed from this wonderful pytorch implementation by @rosinality. We are also thankful to @mseitzer and @richzhang for their user friendly implementations of computing FID score and LPIPS metric respectively.

few-shot-gan-adaptation's People

Contributors

utkarshojha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

few-shot-gan-adaptation's Issues

Results are bad after training with 'augment' command

Thank you for your great work.
I got pretty bad results after training with 'augment' command (adaptive augment).
Could you explain why it would happen or how to fixe it?
Because I gave no idea in theory to avoid this.
Looking forward to your reply.

ckpt_source in train.py

The command line in README for training is with --ckpt_source, however in train.py there is no argument for ckpt_source. I'm wondering whether the lines #547 and #548 supposed to load the same check point and I should just change --ckpt_source to --ckpt in this command: CUDA_VISIBLE_DEVICES=0 python train.py --ckpt_source /path/to/source_model --data_path /path/to/target_data --exp <exp_name>, or it requires some additional changes.
Thanks!

size mismatch for the discriminator convs

I am using the LSUN Cars source model for the training (adaptation). The model is based on the generator architecture defined in Pytorch implementation of StyleGAN2. But, I am having the following size mismatch error:

    Traceback (most recent call last):
      File "train.py", line 564, in <module>
        discriminator.load_state_dict(ckpt["d"])
        raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
    RuntimeError: Error(s) in loading state_dict for Patch_Discriminator:
    Unexpected key(s) in state_dict: "convs.7.conv1.0.weight", "convs.7.conv1.1.bias", "convs.7.conv2.0.kernel", "convs.7.conv2.1.weight", "convs.7.conv2.2.bias", "convs.7.skip.0.kernel", "convs.7.skip.1.weight".
    size mismatch for convs.0.0.weight: copying a param with shape torch.Size([64, 3, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 3, 1, 1]).
    size mismatch for convs.0.1.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
    size mismatch for convs.1.conv1.0.weight: copying a param with shape torch.Size([64, 64, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 128, 3, 3]).
    size mismatch for convs.1.conv1.1.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
    size mismatch for convs.1.conv2.1.weight: copying a param with shape torch.Size([128, 64, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 128, 3, 3]).
    size mismatch for convs.1.conv2.2.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
    size mismatch for convs.1.skip.1.weight: copying a param with shape torch.Size([128, 64, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 128, 1, 1]).
    size mismatch for convs.2.conv1.0.weight: copying a param with shape torch.Size([128, 128, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 256, 3, 3]).
    size mismatch for convs.2.conv1.1.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
    size mismatch for convs.2.conv2.1.weight: copying a param with shape torch.Size([256, 128, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 256, 3, 3]).
    size mismatch for convs.2.conv2.2.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
    size mismatch for convs.2.skip.1.weight: copying a param with shape torch.Size([256, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 256, 1, 1]).
    size mismatch for convs.3.conv1.0.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 512, 3, 3]).
    size mismatch for convs.3.conv1.1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
    size mismatch for convs.3.conv2.1.weight: copying a param with shape torch.Size([512, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 512, 3, 3]).
    size mismatch for convs.3.skip.1.weight: copying a param with shape torch.Size([512, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 512, 1, 1]).

Do you know why this error occurs for the discriminator convs?
Thanks.

FFHQ-babies and FFHQ-sunglasses datasets

Thank you for your open source work! I wonder how can I reproduct the fid comparision results on babies, sunglasses?In other words, how can I get the babies and sunglasses datasets of FFHQ? Thank you so muchhh!

AttributeError: 'NoneType' object has no attribute 'decode'

Traceback (most recent call last):
File "train.py", line 590, in
dataset = MultiResolutionDataset(args.data_path, transform, args.size)
File "/data1/yuhe.ding/Code/few-shot-gan-adaptation-main/dataset.py", line 24, in init
self.length = int(txn.get('length'.encode('utf-8')).decode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'decode'

Anyone can help me?

Entire code release

Hello and thanks for an awesome work!

Just a question on are you and if so, when are you planning to release the rest of the code?

Best regards!

Data for calculating FID

Hi,

Could you check the links to download data to evaluate FID?
Currently, I cannot access them.

Thanks!

generation target domain image for the given selfie image

Nice job, thanks for your open source code.
I have a question about that this code generate the target domain image from noise? or from the source data?
Is it can generate target style image from the given image? Like generation animation characters for myself, like to image-to-image translation task.

viz_image mode and load noise vectors

There is one problem in the generator.py file that probably either in line #91 default mode should be written as viz_imgs or in line #127 should be written as viz_image. One of these two lines should be modified to visualize the images.
Also, in the generator.py file, in line #124, g_ema is not defined for the cases that truncation is less than one.
Furthermore, I am wondering if it would be possible to evaluate the model with the input images instead of the generated ones.

Regarding load_noise option, I am wondering how can we make the noise vectors or if there is any available link to download the noise vectors as noise.pt.

Thanks for your great work.

License

Please add a license to the repo when you can. Great Work. Thanks!!

about ninja error

``hi, i run the following command
CUDA_VISIBLE_DEVICES=0 python3 generate.py --ckpt_target ./checkpoints/ffhq_sketches.pt --load_noise noise.ptpyth

i'm getting the following error :
`Traceback (most recent call last):
File "/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1030, in _build_extension_module
check=True)
File "/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/subprocess.py", line 438, 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 "generate.py", line 7, in
from model import Generator
File "/home/sooyeon/문서/few-shot-gan-adaptation-main/model.py", line 12, in
from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "/home/sooyeon/문서/few-shot-gan-adaptation-main/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/sooyeon/문서/few-shot-gan-adaptation-main/op/fused_act.py", line 14, in
os.path.join(module_path, 'fused_bias_act_kernel.cu'),
File "/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 661, in load
is_python_module)
File "/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 830, in jit_compile
with_cuda=with_cuda)
File "/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 883, in write_ninja_file_and_build
build_extension_module(name, build_directory, verbose)
File "/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1043, in build_extension_module
raise RuntimeError(message)
RuntimeError: Error building extension 'fused': [1/3] c++ -MMD -MF fused_bias_act.o.d -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/TH -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/THC -isystem /home/sooyeon/anaconda3/envs/few-shot/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c '/home/sooyeon/문서/few-shot-gan-adaptation-main/op/fused_bias_act.cpp' -o fused_bias_act.o
[2/3] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/TH -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/THC -isystem /home/sooyeon/anaconda3/envs/few-shot/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_61,code=sm_61 --compiler-options '-fPIC' -std=c++11 -c '/home/sooyeon/문서/few-shot-gan-adaptation-main/op/fused_bias_act_kernel.cu' -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/TH -isystem /home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/THC -isystem /home/sooyeon/anaconda3/envs/few-shot/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_61,code=sm_61 --compiler-options '-fPIC' -std=c++11 -c '/home/sooyeon/문서/few-shot-gan-adaptation-main/op/fused_bias_act_kernel.cu' -o fused_bias_act_kernel.cuda.o
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/core/TensorMethods.h:5084:246: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/core/TensorMethods.h:5084:246: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/core/TensorMethods.h:5084:246: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (4, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:686:422: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type > constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/core/TensorMethods.h:5084:246: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (4, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (5ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (5ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1476:450: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (5ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (5ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1476:450: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1476:450: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (6, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:686:422: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type > constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1476:450: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (6, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’:
/usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1492:115: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’:
/usr/include/c++/6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1492:115: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’:
/usr/include/c++/6/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1492:115: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’:
/usr/include/c++/6/tuple:686:422: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type > constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:1492:115: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor > >&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, std::vector<at::Tensor, std::allocatorat::Tensor >}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’:
/usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:2265:276: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’:
/usr/include/c++/6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:2265:276: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’:
/usr/include/c++/6/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, long int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, long int}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, long int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:2265:276: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’:
/usr/include/c++/6/tuple:686:422: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, long int>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type > constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, long int}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, long int>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:2265:276: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, long int>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, long int}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:3451:244: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:3451:244: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>}; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:3451:244: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’:
/usr/include/c++/6/tuple:686:422: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type > constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, at::Tensor, at::Tensor>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:3451:244: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor>&&; bool = true; _Elements = {at::Tensor, at::Tensor, at::Tensor, at::Tensor}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, double, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, double, long int}]’:
/usr/include/c++/6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, double, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, double, long int>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, double, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:4625:206: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, double, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, double, long int}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, double, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, double, long int}]’:
/usr/include/c++/6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, double, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor, at::Tensor, double, long int>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor, at::Tensor, double, long int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (4ul >= 1)), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:4625:206: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor, at::Tensor, double, long int>}; bool = true; _Elements = {at::Tensor, at::Tensor, double, long int}]’ not a return-statement
}
^
/usr/include/c++/6/tuple: In instantiation of ‘static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<at::Tensor, at::Tensor, double, long int>&; bool = true; _Elements = {at::Tensor, at::Tensor, double, long int}]’:
/usr/include/c++/6/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, double, long int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {at::Tensor, at::Tensor, double, long int}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor, at::Tensor, double, long int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), at::Tensor, at::Tensor, double, long int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]’
/home/sooyeon/anaconda3/envs/few-shot/lib/python3.6/site-packages/torch/include/ATen/Functions.h:4625:206: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (5, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^

.
.
.
.
etc
.
.
.

       ^~~~~~~~

ninja: build stopped: subcommand failed.
`

gcc version : 7.5.0
ninja version : 1.8.2

Questions about the paper.

This work is interesting and the results reported in the paper surprised me! I have the following two questions about this work, and would be appreciated if you can solve my confusion.

  1. The qualitative results show that this work seems to achieve the image-to-image translation while the architecture of the proposed GAN model is represented as random noises to images. I am not really sure how to achieve the image-to-image translation. I guess it might be because of the proposed anchor space that restrict the identity preservation between source and target domains. Is it right? Could you explain it in details?
  2. I am not really sure about the motivation on two discriminators. Why do you use D_{img} for anchor space sampling while use D_{patch} for entire space sampling?
  3. Only qualitative results on ablation study are reported in the paper. But I think the quantitative results could be more convincing since it is difficult to judge the performance of different components according to Fig.5.

Best regards!

Something wrong in your code in 'Visualizing correspondence results'

What you wrote now is:
CUDA_VISIBLE_DEVICES=0 python generate.py --ckpt_source /path/to/source --ckpt_target /path/to/target --load_noise noise.pt
CUDA_VISIBLE_DEVICES=0 python generate.py --ckpt_source /path/to/source --ckpt_target /path/to/source --load_noise noise.pt --mode interpolate

In the second one, I think it shouldn't be 'path/to/source' but 'path/to/target' after '--ckpt_target'.
Am I right?

Training with other pretrained StyleGAN2 error

I trained successfully with pretrained ffhq as example code.

However I tried to trained using other pretrained model as a source model for example Anime portraits from https://github.com/justinpinkney/awesome-pretrained-stylegan2 (I already convert the pretrained model from .pkl to .pt) but I got an error it said

load model: /content/drive/MyDrive/FEWSHOTGAN/data/checkpoints/anime.pt Traceback (most recent call last): File "/content/drive/MyDrive/FEWSHOTGAN/few-shot-gan-adaptation-main/train.py", line 551, in <module> assert args.source_key in args.ckpt #comment AssertionError

Anyone know how to fix this?
Thank you

RuntimeError: Ninja is required to load C++ extensions

Traceback (most recent call last):
File "generate.py", line 6, in
from model import Generator
File "/data1/yuhe.ding/Code/few-shot-gan-adaptation-main/model.py", line 12, in
from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "/data1/yuhe.ding/Code/few-shot-gan-adaptation-main/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/data1/yuhe.ding/Code/few-shot-gan-adaptation-main/op/fused_act.py", line 14, in
os.path.join(module_path, 'fused_bias_act_kernel.cu'),
File "/home/yuhe.ding/data1/python3.6/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 980, in load
keep_intermediates=keep_intermediates)
File "/home/yuhe.ding/data1/python3.6/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1185, in _jit_compile
with_cuda=with_cuda)
File "/home/yuhe.ding/data1/python3.6/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1251, in _write_ninja_file_and_build_library
verify_ninja_availability()
File "/home/yuhe.ding/data1/python3.6/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1306, in verify_ninja_availability
raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions

Can anybody help me?

stuck at g_optim.step()

Hello. When I run train.py on my own 10-shot images (source domain: FFHQ), the training always stuck at g_optim.step() in "if g_regularize:". It always takes about half an hour to process this line. My device is NVIDIA 3090 with Cuda 11.4. How can I solve this issue?

Implementation of ewc

Thanks for sharing your great work!

I want to run some experiments on the ewc method for few shot image generation, but I can not find code released by the authors or any third party on github... Seeing you reported experiment with ewc in your paper, I wonder if you re-implemented the method or is there any public implemetation that I missed?

Greatly appreciated if you could share the implementation of the ewc method with me!

dataset access in "Evaluating FID"

Hello, and what a nice job!

I have some trouble accessing the dataset listed in the "Evaluating FID". I can't visit your local server. Is there any other access to the dataset for evaluating?

README links not working

Hello. Thank you for an amazing work.

The links in the README for target 10 images under: "Below are the links to all the target domains, each consisting of 10 images, used in the paper.", seems to not work.

Would you mind updating them (or pasting them here)?

All the best!
Ivan

Error on example code execution

I tried to execute this sample code and got the following error (listed the last since the error is too long).
CUDA_VISIBLE_DEVICES=0 python train.py --ckpt_source ./checkpoints/source_ffhq.pt --data_path ./processed_data/sketches --exp ffhq_to_sketches
When you use the ninja or meson libary how did you use it? and If you are Ok, I want to know whether same things was happen while code implementation.
`Traceback (most recent call last):
File "/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1672, in _run_ninja_build
env=env)
File "/opt/conda/envs/myenv/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "train.py", line 27, in
from model import Generator, Extra
File "/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/model.py", line 12, in
from op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_act.py", line 14, in
os.path.join(module_path, 'fused_bias_act_kernel.cu'),
File "/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1092, in load
keep_intermediates=keep_intermediates)
File "/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1303, in jit_compile
is_standalone=is_standalone)
File "/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1408, in write_ninja_file_and_build_library
error_prefix=f"Error building extension '{name}'")
File "/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1682, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'fused': ninja: warning: bad deps log signature or version; starting over
[1/3] c++ -MMD -MF fused_bias_act.o.d -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/TH -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/THC -isystem /opt/conda/envs/myenv/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp -o fused_bias_act.o
In file included from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/core/DeviceType.h:8:0,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/core/Device.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/core/Allocator.h:6,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ATen.h:7,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from /trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:1:
/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp: In function 'at::Tensor fused_bias_act(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, float, float)':
/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:7:42: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
^
/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:13:5: note: in expansion of macro 'CHECK_CUDA'
CHECK_CUDA(input);
^
In file included from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from /trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:1:
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:338:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
In file included from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/core/DeviceType.h:8:0,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/core/Device.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/core/Allocator.h:6,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ATen.h:7,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from /trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:1:
/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:7:42: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
^
/trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:14:5: note: in expansion of macro 'CHECK_CUDA'
CHECK_CUDA(bias);
^
In file included from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
from /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
from /trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act.cpp:1:
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:338:30: note: declared here
DeprecatedTypeProperties & type() const {
^~~~
[2/3] /usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/TH -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/THC -isystem /opt/conda/envs/myenv/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
--expt-relaxed-constexpr -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' -std=c++14 -c /trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
/usr/bin/nvcc -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/TH -isystem /opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/THC -isystem /opt/conda/envs/myenv/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 --compiler-options '-fPIC' -std=c++14 -c /trainman-mount/trainman-k8s-storage-e6640780-7a85-4957-aefc-7ea75c73402a/exp-caricature/few-shot-gan-adaptation/op/fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >}; bool = true; _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]':
/usr/include/c++/6/tuple:626:248: required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]'
/usr/include/c++/6/tuple:1396:58: required from 'constexpr std::tuple<typename std::__decay_and_strip<_Elements>::__type ...> std::make_tuple(_Elements&& ...) [with _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ExpandUtils.h:166:169: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding 'std::is_constructible<_Elements, _UElements&&>'
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >}; bool = true; _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]':
/usr/include/c++/6/tuple:626:362: required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {std::tuple<c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]'
/usr/include/c++/6/tuple:1396:58: required from 'constexpr std::tuple<typename std::__decay_and_strip<_Elements>::__type ...> std::make_tuple(_Elements&& ...) [with _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ExpandUtils.h:166:169: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding 'std::is_convertible<_UElements&&, _Elements>'
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >&; bool = true; _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]':
/usr/include/c++/6/tuple:662:419: required by substitution of 'template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]'
/usr/include/c++/6/tuple:1396:58: required from 'constexpr std::tuple<typename std::__decay_and_strip<_Elements>::__type ...> std::make_tuple(_Elements&& ...) [with _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ExpandUtils.h:166:169: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (4, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for 'template<class _From, class _To> struct std::is_convertible'
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >&&; bool = true; _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]':
/usr/include/c++/6/tuple:686:422: required by substitution of 'template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type > constexpr std::tuple< >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor >::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type = ]'
/usr/include/c++/6/tuple:1396:58: required from 'constexpr std::tuple<typename std::__decay_and_strip<_Elements>::__type ...> std::make_tuple(_Elements&& ...) [with _Elements = {c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor, c10::MaybeOwnedat::Tensor}]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/ATen/ExpandUtils.h:166:169: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (4, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for 'template<class _From, class _To> struct std::is_convertible'
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {const c10::nullopt_t&}; bool = true; _Elements = {std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int}]':
/usr/include/c++/6/tuple:626:248: required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {const c10::nullopt_t&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]'
/usr/include/c++/6/type_traits:970:16: required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>; _Arg = const c10::nullopt_t&; = ]'
/usr/include/c++/6/type_traits:981:40: required from 'struct std::__is_direct_constructible_impl<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:143:8: required from 'struct std::_and<std::is_destructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >, std::__is_direct_constructible_impl<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&> >'
/usr/include/c++/6/type_traits:985:8: required from 'struct std::__is_direct_constructible_new_safe<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1067:8: required from 'struct std::__is_direct_constructible_new<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1075:8: required from 'struct std::__is_direct_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1115:8: required from 'struct std::__is_constructible_impl<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1126:8: required from 'struct std::is_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:533:77: required by substitution of 'template<class U, typename std::enable_if<(((std::is_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, U&&>::value && (! std::is_same<typename std::decay<_Tp>::type, c10::in_place_t>::value)) && (! std::is_same<typename std::decay<_Tp>::type, c10::optional<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> > >::value)) && std::is_convertible<U&&, std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >::value), bool>::type > constexpr c10::optional::optional(U&&) [with U = const c10::nullopt_t&; typename std::enable_if<(((std::is_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, U&&>::value && (! std::is_same<typename std::decay<_Tp>::type, c10::in_place_t>::value)) && (! std::is_same<typename std::decay<_Tp>::type, c10::optional<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> > >::value)) && std::is_convertible<U&&, std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >::value), bool>::type = ]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/jit/frontend/source_range.h:148:13: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding 'std::is_constructible<_Elements, _UElements&&>'
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {const c10::nullopt_t&}; bool = true; _Elements = {std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int}]':
/usr/include/c++/6/tuple:626:362: required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {const c10::nullopt_t&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]'
/usr/include/c++/6/type_traits:970:16: required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>; _Arg = const c10::nullopt_t&; = ]'
/usr/include/c++/6/type_traits:981:40: required from 'struct std::__is_direct_constructible_impl<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:143:8: required from 'struct std::_and<std::is_destructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >, std::__is_direct_constructible_impl<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&> >'
/usr/include/c++/6/type_traits:985:8: required from 'struct std::__is_direct_constructible_new_safe<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1067:8: required from 'struct std::__is_direct_constructible_new<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1075:8: required from 'struct std::__is_direct_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1115:8: required from 'struct std::__is_constructible_impl<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/usr/include/c++/6/type_traits:1126:8: required from 'struct std::is_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, const c10::nullopt_t&>'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:533:77: required by substitution of 'template<class U, typename std::enable_if<(((std::is_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, U&&>::value && (! std::is_same<typename std::decay<_Tp>::type, c10::in_place_t>::value)) && (! std::is_same<typename std::decay<_Tp>::type, c10::optional<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> > >::value)) && std::is_convertible<U&&, std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >::value), bool>::type > constexpr c10::optional::optional(U&&) [with U = const c10::nullopt_t&; typename std::enable_if<(((std::is_constructible<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>, U&&>::value && (! std::is_same<typename std::decay<_Tp>::type, c10::in_place_t>::value)) && (! std::is_same<typename std::decay<_Tp>::type, c10::optional<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> > >::value)) && std::is_convertible<U&&, std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >::value), bool>::type = ]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/jit/frontend/source_range.h:148:13: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding 'std::is_convertible<_UElements&&, _Elements>'
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {const std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>&}; bool = true; _Elements = {std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int}]':
/usr/include/c++/6/tuple:626:248: required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {const std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:190:73: required from 'constexpr c10::optional_base::optional_base() [with T = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:508:67: required from 'constexpr c10::optional::optional(c10::nullopt_t) [with T = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/jit/frontend/source_range.h:148:13: required from here
/usr/include/c++/6/tuple:483:67: error: mismatched argument pack lengths while expanding 'std::is_constructible<_Elements, _UElements&&>'
return _and<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {const std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>&}; bool = true; _Elements = {std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int}]':
/usr/include/c++/6/tuple:626:362: required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {const std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:190:73: required from 'constexpr c10::optional_base::optional_base() [with T = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:508:67: required from 'constexpr c10::optional::optional(c10::nullopt_t) [with T = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/jit/frontend/source_range.h:148:13: required from here
/usr/include/c++/6/tuple:489:65: error: mismatched argument pack lengths while expanding 'std::is_convertible<_UElements&&, _Elements>'
return _and<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>&; bool = true; _Elements = {std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int}]':
/usr/include/c++/6/tuple:662:419: required by substitution of 'template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type > constexpr std::tuple< >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type = ]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:190:73: required from 'constexpr c10::optional_base::optional_base() [with T = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/c10/util/Optional.h:508:67: required from 'constexpr c10::optional::optional(c10::nullopt_t) [with T = std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>]'
/opt/conda/envs/myenv/lib/python3.6/site-packages/torch/include/torch/csrc/jit/frontend/source_range.h:148:13: required from here
/usr/include/c++/6/tuple:495:244: error: wrong number of template arguments (4, should be 2)
return _and<_not<is_same<tuple<_Elements...>,
^
/usr/include/c++/6/type_traits:1558:8: note: provided for 'template<class _From, class _To> struct std::is_convertible'
struct is_convertible
^~~~~~~~~~~~~~
/usr/include/c++/6/tuple: In instantiation of 'static constexpr bool std::_TC<, _Elements>::_MoveConstructibleTuple() [with _UElements = {c10::optional<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >}; bool = true; _Elements = {std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int}]':
/usr/include/c++/6/tuple:626:248: required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type > constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {c10::optional<std::tuple<std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int> >}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), std::basic_string<char, std::char_traits, std::allocator >, long unsigned int, long unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type = ]'
/usr/include/c++/6/type_traits:970:16: required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<std::basic_string<char, std::char_traits

Error when using more than 2 GPUs

Hi, when I execute the sample code like that, I have the following error.
Does anyone have similar error and how did you solve it?

CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python train.py --batch 32 --ckpt ./checkpoints/source_ffhq.pt --data_path ./processed_data/<dataset>/ --exp <exp_name>

Traceback (most recent call last): File "train.py", line 602, in <module> train(args, loader, generator, discriminator, extra, g_optim, File "train.py", line 303, in train source_sample, feat_source = g_source([z], return_feats=True) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 161, in forward outputs = self.parallel_apply(replicas, inputs, kwargs) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 171, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply output.reraise() File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/_utils.py", line 428, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in replica 4 on device 4. Original Traceback (most recent call last): File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker output = module(*input, **kwargs) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) TypeError: forward() missing 1 required positional argument: 'styles'

[Help] My generated images failed

sample
I just follow the generation guide with some modify(CUDA) as shown in the following code (I am quite new in deep learning)

set CUDA_VISIBLE_DEVICES=0 & python generate.py --ckpt_source ./checkpoints/ffhq_sketches.pt --ckpt_target ./checkpoints/ffhq_sketches.pt --load_noise noise.pt

And the attached image is the generated image I got.
I just wondering if I did something wrong? Any recommendation?

Thanks

How to reproduce the FID indicator?

Thank you for your good job! I have a question about the FID. I use the code in the picture to calculate the FID score. However, I failed to reproduce the FID score. Would you share your experimental settings?
image

Dlatents average usage

Hello, and thanks for a great work!

I am wondering why dlatents_avg (latent_avg in the )aren't used in the stylegan2 network. The tensorflow version of the Stylegan2 when tracking it and using truncation with it gives a much better quality to the results.

I see the PyTorch version also supports it with the truncation and truncation_latent parameters in the forward call of the generator. I have tried implementing it myself, but am actually getting slightly worse results.

Also, are you planning to add support for it?

All the best,
Ivan

A Question about paper

Hi,
Thank you for answering previous issue!

I have one question about your paper.
In Table1 where reported FID scores between methods, the standard deviations seem to be too small compared to the mean value.

Would you share your experimental settings or let me know how to run the experiments for measuring FID scores?

Best regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.