Skip to content

Commit

Permalink
add warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lmxyy committed Aug 14, 2020
1 parent 0f6526c commit 5351461
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions search_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

from configs import encode_config
from data import create_dataloader
from metric import get_fid, get_mIoU
from metric import get_fid, get_cityscapes_mIoU
from metric.inception import InceptionV3
from metric.mIoU_score import DRNSeg
from metric.cityscapes_mIoU import DRNSeg
from models import create_model
from options.search_options import SearchOptions
from utils import util
Expand Down Expand Up @@ -100,10 +100,10 @@ def main(configs, opt, gpu_id, queue, verbose):
result['fid'] = 1e9
if 'cityscapes' in opt.dataroot and opt.direction == 'BtoA':
if qualified:
mIoU = get_mIoU(fakes, names, drn_model, device,
data_dir=opt.cityscapes_path,
batch_size=opt.batch_size,
num_workers=opt.num_threads, use_tqdm=False)
mIoU = get_cityscapes_mIoU(fakes, names, drn_model, device,
data_dir=opt.cityscapes_path,
batch_size=opt.batch_size,
num_workers=opt.num_threads, use_tqdm=False)
result['mIoU'] = mIoU
else:
result['mIoU'] = mIoU
Expand All @@ -113,6 +113,9 @@ def main(configs, opt, gpu_id, queue, verbose):


if __name__ == '__main__':
warnings.warn(
'This script is deprecated. Please set up multi-GPU searching manually '
'(for more details, please refer to ./docs/training_tutorial.md).')
mp.set_start_method('spawn')
opt = SearchOptions().parse()
print(' '.join(sys.argv), flush=True)
Expand Down

0 comments on commit 5351461

Please sign in to comment.