code stringlengths 3 6.57k |
|---|
torch.sigmoid(pred_outs['conf']) |
torch.sigmoid(pred_outs['conf'][:, :, 0]) |
F.softmax(pred_outs['conf'][:, :, 1:], -1) |
F.softmax(pred_outs['conf'], -1) |
torch.sigmoid(pred_outs['conf'][:, :, 0]) |
F.softmax(pred_outs['conf'][:, :, 1:], dim=-1) |
F.softmax(pred_outs['conf'], -1) |
self.detect(pred_outs, self) |
init_console() |
len(sys.argv) |
set_cfg(sys.argv[1]) |
Yolact() |
net.train() |
net.init_weights(backbone_path='weights/' + cfg.backbone.path) |
net.cuda() |
torch.set_default_tensor_type('torch.cuda.FloatTensor') |
torch.zeros((1, 3, cfg.max_size, cfg.max_size) |
net(x) |
print(p.last_conv_size) |
print() |
y.items() |
print(k + ': ', a.size() |
torch.sum(a) |
exit() |
net(x) |
timer.disable('pass2') |
MovingAverage() |
timer.reset() |
timer.env('everything else') |
net(x) |
avg.add(timer.total_time() |
print('\033[2J') |
timer.print_stats() |
print('Avg fps: %.2f\tAvg ms: %.2f ' % (1/avg.get_avg() |
avg.get_avg() |
CheckFunctionSetHandler(APIHandler) |
post(self) |
self.get_json_body() |
params.get('api_token', None) |
check_function_set(api_endpoint, api_token) |
self.log.info(function_set) |
self.finish(json.dumps(function_set) |
ResourceHandler(APIHandler) |
post(self) |
self.get_json_body() |
params.get('api_token', None) |
os.environ.get('GROUP_ID') |
self.log.info('group_info with group_id: {}'.format(group_id) |
self.finish(json.dumps(group_info(api_endpoint, api_token, group_id) |
SubmitJobHandler(APIHandler) |
post(self) |
self.get_json_body() |
params.get('api_token', None) |
params.get('name', 'notebook_job') |
os.environ.get('GROUP_ID') |
params.get('instance_type', None) |
params.get('image', os.environ.get('IMAGE_NAME') |
params.get('path', None) |
params.get('notebook_parameters', '') |
self.log.info('group_info with group_id: {}'.format(group_id) |
os.path.join(NOTEBOOK_DIR, path) |
self.log.info("relative path: " + path) |
self.log.info("notebook path: " + fullpath) |
params.get('group_name', os.environ.get('GROUP_NAME') |
datetime.now() |
strftime("%Y%m%d%H%M%S%f") |
path.split('/') |
pop() |
os.path.join(NOTEBOOK_DIR, path.replace(nb_file_name, '') |
nb_file_name.replace('.ipynb', '') |
os.path.join(NOTEBOOK_DIR, path.replace(nb_file_name, '') |
os.path.join(NOTEBOOK_DIR, path.replace(nb_file_name, '') |
replace('.ipynb', '-output.ipynb') |
copyfile(fullpath, hidden_nb_fullpath) |
notebook_parameters.replace(' ', '') |
split(';') |
parameter.split('=') |
format(kv[0], kv[1]) |
str(e) |
format(nb_directory_path, hidden_nb_fullpath, output_nb_fullpath, papermill_parameters, hidden_nb_fullpath) |
self.finish(json.dumps(submit_job(api_endpoint, api_token, name, group_id, instance_type, image, command_str) |
EnvironmentHandler(APIHandler) |
post(self) |
self.finish(json.dumps(get_env() |
url_pattern(web_app, endpoint, *pieces) |
url_path_join(base_url, NAMESPACE, endpoint, *pieces) |
setup_handlers(lab_app: LabApp) |
setup_globals(lab_app) |
apply_api_endpoint_override(logger) |
url_pattern(web_app, 'check-function') |
url_pattern(web_app, 'resources') |
url_pattern(web_app, 'submit-job') |
url_pattern(web_app, 'get-env') |
web_app.add_handlers(host_pattern, handlers) |
logger.info('handler => {}'.format(h) |
setup_globals(lab_app) |
lab_app.log.info('setup globals') |
lab_app.log.info('\tNOTEBOOK_DIR: ' + NOTEBOOK_DIR) |
apply_api_endpoint_override(logger) |
os.environ.get(ENV_API_ENDPOINT, None) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.