diff --git a/LICENSE.txt b/LICENSE.txt index 7406cd76..091b42fc 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,13 +1,15 @@ -Copyright (C) 2017 NVIDIA Corporation. Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. -All rights reserved. -Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). - -Permission to use, copy, modify, and distribute this software and its documentation -for any non-commercial purpose is hereby granted without fee, provided that the above -copyright notice appear in all copies and that both that copyright notice and this -permission notice appear in supporting documentation, and that the name of the author -not be used in advertising or publicity pertaining to distribution of the software -without specific, written prior permission. +Copyright (C) 2019 NVIDIA Corporation. Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. +BSD License. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE. diff --git a/data/aligned_dataset.py b/data/aligned_dataset.py index 6e01a012..29785c19 100755 --- a/data/aligned_dataset.py +++ b/data/aligned_dataset.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import os.path from data.base_dataset import BaseDataset, get_params, get_transform, normalize from data.image_folder import make_dataset diff --git a/data/base_dataset.py b/data/base_dataset.py index 038d3d2a..ece8813d 100755 --- a/data/base_dataset.py +++ b/data/base_dataset.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import torch.utils.data as data from PIL import Image import torchvision.transforms as transforms diff --git a/encode_features.py b/encode_features.py index 3adfedd8..158c85a0 100755 --- a/encode_features.py +++ b/encode_features.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). from options.train_options import TrainOptions from data.data_loader import CreateDataLoader from models.models import create_model diff --git a/models/base_model.py b/models/base_model.py index e4bba811..f3f6b535 100755 --- a/models/base_model.py +++ b/models/base_model.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import os import torch import sys diff --git a/models/models.py b/models/models.py index a0d05044..be1e30e6 100755 --- a/models/models.py +++ b/models/models.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import torch def create_model(opt): diff --git a/models/networks.py b/models/networks.py index 476ccb3d..ee05d85d 100755 --- a/models/networks.py +++ b/models/networks.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import torch import torch.nn as nn import functools diff --git a/models/pix2pixHD_model.py b/models/pix2pixHD_model.py index 851460e1..fafdec0b 100755 --- a/models/pix2pixHD_model.py +++ b/models/pix2pixHD_model.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import numpy as np import torch import os diff --git a/models/ui_model.py b/models/ui_model.py index 056a335d..c5b34335 100755 --- a/models/ui_model.py +++ b/models/ui_model.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import torch from torch.autograd import Variable from collections import OrderedDict diff --git a/options/base_options.py b/options/base_options.py index 1bfe14df..0d5e769e 100755 --- a/options/base_options.py +++ b/options/base_options.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import argparse import os from util import util diff --git a/options/test_options.py b/options/test_options.py index 32d926a5..f27fc5ea 100755 --- a/options/test_options.py +++ b/options/test_options.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). from .base_options import BaseOptions class TestOptions(BaseOptions): diff --git a/options/train_options.py b/options/train_options.py index 9994a4ab..cacb8e7b 100755 --- a/options/train_options.py +++ b/options/train_options.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). from .base_options import BaseOptions class TrainOptions(BaseOptions): diff --git a/precompute_feature_maps.py b/precompute_feature_maps.py index d7fe4184..8836ea2c 100755 --- a/precompute_feature_maps.py +++ b/precompute_feature_maps.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). from options.train_options import TrainOptions from data.data_loader import CreateDataLoader from models.models import create_model diff --git a/test.py b/test.py index da1312dd..e0b1ec33 100755 --- a/test.py +++ b/test.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import os from collections import OrderedDict from torch.autograd import Variable diff --git a/train.py b/train.py index 2a9d080f..acedac25 100755 --- a/train.py +++ b/train.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import time import os import numpy as np @@ -7,7 +5,6 @@ from torch.autograd import Variable from collections import OrderedDict from subprocess import call -from apex import amp import fractions def lcm(a,b): return abs(a * b)/fractions.gcd(a,b) if a and b else 0 @@ -44,6 +41,7 @@ def lcm(a,b): return abs(a * b)/fractions.gcd(a,b) if a and b else 0 model = create_model(opt) visualizer = Visualizer(opt) if opt.fp16: + from apex import amp model, [optimizer_G, optimizer_D] = amp.initialize(model, [model.optimizer_G, model.optimizer_D], opt_level='O1') model = torch.nn.DataParallel(model, device_ids=opt.gpu_ids) else: diff --git a/util/visualizer.py b/util/visualizer.py index 41a43c08..584ac45d 100755 --- a/util/visualizer.py +++ b/util/visualizer.py @@ -1,5 +1,3 @@ -### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. -### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import numpy as np import os import ntpath