text stringlengths 1 93.6k |
|---|
with st.echo():
|
plost.bar_chart(
|
data=datasets['pageviews'],
|
bar='pagenum',
|
value='pageviews',
|
width=500,
|
pan_zoom='minimap')
|
"---"
|
with st.echo():
|
plost.bar_chart(
|
data=datasets['pageviews'],
|
bar='pagenum',
|
value='pageviews',
|
direction='horizontal',
|
width=500,
|
height=500,
|
pan_zoom='minimap')
|
""
|
""
|
""
|
""
|
"🍅"
|
# <FILESEP>
|
from __future__ import print_function
|
import argparse
|
import os.path as osp
|
import sys
|
import time
|
import warnings
|
import torch
|
import torch.backends.cudnn as cudnn
|
import torch.nn as nn
|
import torch.optim as optim
|
import torch.utils.data as data
|
import torchvision.transforms as transforms
|
from torch.autograd import Variable
|
from model import embed_net
|
from utils.data_utils import *
|
from utils.eval_utils import *
|
from utils.misc import Logger, set_seed
|
warnings.filterwarnings("ignore", category=UserWarning)
|
parser = argparse.ArgumentParser(description='PyTorch Cross-Modality Testing')
|
### dataloader config
|
parser.add_argument('--dataset', default='sysu', help='dataset name: [regdb or sysu]')
|
parser.add_argument('--workers', default=4, type=int, help='number of data loading workers (default: 4)')
|
parser.add_argument('--img_h', default=288, type=int, help='img height')
|
parser.add_argument('--img_w', default=144, type=int, help='img width')
|
parser.add_argument('--num_pos', default=4, type=int, help='num of pos per identity in each modality')
|
parser.add_argument('--batch_size', default=8, type=int, help='training batch size')
|
parser.add_argument('--test-batch', default=64, type=int, help='testing batch size')
|
### directory config
|
parser.add_argument('--save_path', default='log/', type=str, help='parent save directory')
|
parser.add_argument('--exp_name', default='exp', type=str, help='child save directory')
|
parser.add_argument('--model_name', default='ep_80', type=str,help='model save path')
|
### model/training config
|
parser.add_argument('--method', default='full', type=str, help='method type: [baseline or full]')
|
### evaluation protocols
|
parser.add_argument('--trial', default=1, type=int, help='trial (only for RegDB dataset)')
|
parser.add_argument('--tvsearch', action='store_true', help='whether thermal to visible search on RegDB')
|
parser.add_argument('--mode', default='all', type=str, help='all or indoor for sysu')
|
### misc
|
parser.add_argument('--seed', default=0, type=int, help='random seed')
|
parser.add_argument('--nvidia_device', default=0, type=int, help='gpu device to use')
|
args = parser.parse_args()
|
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.nvidia_device)
|
set_seed(args.seed)
|
dataset = args.dataset
|
if dataset == 'sysu':
|
data_path = '/workspace/dataset/SYSU-MM01/'
|
n_class = 395
|
test_mode = [1, 2]
|
elif dataset =='regdb':
|
data_path = '/workspace/dataset/RegDB/'
|
n_class = 206
|
test_mode = [2, 1]
|
device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
|
pool_dim = 2048
|
print('==> Building model..')
|
net = embed_net(args, n_class)
|
net.to(device)
|
cudnn.benchmark = True
|
sys.stdout = Logger(osp.join(args.save_path, '{}/os_test.txt'.format(args.exp_name)))
|
print('==> Loading data..')
|
# Data loading code
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.