Skip to content

Commit

Permalink
change license to BSD
Browse files Browse the repository at this point in the history
  • Loading branch information
tcwang0509 committed Jun 14, 2019
1 parent cf94f86 commit 5a2c872
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 41 deletions.
22 changes: 12 additions & 10 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 0 additions & 2 deletions data/aligned_dataset.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions data/base_dataset.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions encode_features.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions models/base_model.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions models/models.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 0 additions & 2 deletions models/networks.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions models/pix2pixHD_model.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions models/ui_model.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions options/base_options.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions options/test_options.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 0 additions & 2 deletions options/train_options.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 0 additions & 2 deletions precompute_feature_maps.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions train.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
### 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
import torch
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

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions util/visualizer.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5a2c872

Please sign in to comment.