9766d2c13ddca10d5e45280450ee9cab649afb18,eval_pt.py,,main,#,140
Before Change
use_cuda=use_cuda,
remove_module=args.remove_module)
if hasattr(net, "module"):
input_image_size = net.module.in_size[0] if hasattr(net.module, "in_size") else args.input_size
else:
input_image_size = net.in_size[0] if hasattr(net, "in_size") else args.input_size
val_data = get_val_data_loader(
After Change
log_packages=args.log_packages,
log_pip_packages=args.log_pip_packages)
ds_metainfo = get_dataset_metainfo(dataset_name=args.dataset)
ds_metainfo.update(args=args)
assert (ds_metainfo.ml_type != "imgseg") or (args.batch_size == 1)
assert (ds_metainfo.ml_type != "imgseg") or args.disable_cudnn_autotune
use_cuda, batch_size = prepare_pt_context(
num_gpus=args.num_gpus,
batch_size=args.batch_size)
net = prepare_model(
model_name=args.model,
use_pretrained=args.use_pretrained,
pretrained_model_file_path=args.resume.strip(),
use_cuda=use_cuda,
net_extra_kwargs=ds_metainfo.net_extra_kwargs,
load_ignore_extra=ds_metainfo.load_ignore_extra,
num_classes=args.num_classes,
in_channels=args.in_channels,
remove_module=args.remove_module)
real_net = net.module if hasattr(net, "module") else net
input_image_size = real_net.in_size[0] if hasattr(real_net, "in_size") else args.input_size
if args.data_subset == "val":
test_data = get_val_data_source(
ds_metainfo=ds_metainfo,
batch_size=batch_size,
num_workers=args.num_workers)
test_metric = get_composite_metric(
metric_names=ds_metainfo.val_metric_names,
metric_extra_kwargs=ds_metainfo.val_metric_extra_kwargs)
else:
test_data = get_test_data_source(
ds_metainfo=ds_metainfo,
batch_size=batch_size,
num_workers=args.num_workers)
test_metric = get_composite_metric(
metric_names=ds_metainfo.test_metric_names,
metric_extra_kwargs=ds_metainfo.test_metric_extra_kwargs)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: osmr/imgclsmob
Commit Name: 9766d2c13ddca10d5e45280450ee9cab649afb18
Time: 2019-05-10
Author: osemery@gmail.com
File Name: eval_pt.py
Class Name:
Method Name: main
Project Name: osmr/imgclsmob
Commit Name: 9766d2c13ddca10d5e45280450ee9cab649afb18
Time: 2019-05-10
Author: osemery@gmail.com
File Name: eval_pt.py
Class Name:
Method Name: main
Project Name: osmr/imgclsmob
Commit Name: 2f4a31ca40c2fc3922e8002861fd768efd9a39f5
Time: 2019-05-12
Author: osemery@gmail.com
File Name: train_ch.py
Class Name:
Method Name: main
Project Name: osmr/imgclsmob
Commit Name: 7f95637dd388e6c9d253847d634bfc7b0af05dda
Time: 2019-05-11
Author: osemery@gmail.com
File Name: eval_ch.py
Class Name:
Method Name: main