当前位置:网站首页>Detectron2 usage model
Detectron2 usage model
2022-04-23 21:01:00 【Top of the program】
from Yacs Config Build the model
from yacs Configuration object , Model ( And its sub models ) Can pass build_model、build_backbone、build_roi_heads Equifunction construction :
from detectron2.modeling import build_model
model = build_model(cfg) # returns a torch.nn.Module
build_model Build a random model with only structural parameters . About how to put existing checkpoint Information about loading into the model and how to use the model object , See below .
load / Save checkpoint
from detectron2.checkpoint import DetectionCheckpointer
DetectionCheckpointer(model).load(file_path_or_url) # load a file, usually from cfg.MODEL.WEIGHTS
checkpointer = DetectionCheckpointer(model, save_dir="output")
checkpointer.save("model_999") # save to output/model_999.pth
Detectron2 Checkpoint identification for pytorch Of .pth Format model , And us model zoon Medium .pkl file . More details about its usage , see also API file .
have access to torch.{load,save} Yes .pth File or pickle.{dump,load} Yes .pkl File arbitrary operation .
版权声明
本文为[Top of the program]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/111/202204210545090198.html
边栏推荐
- Explore ASP Net core read request The correct way of body
- Assertionerror: invalid device ID and runtimeerror: CUDA error: invalid device ordinal
- Keywords static, extern + global and local variables
- Prim、Kruskal
- go struct
- DeNO 1.13.2 release
- 41. The first missing positive number
- 笔记本电脑卡顿怎么办?教你一键重装系统让电脑“复活”
- 3-5通过XSS获取cookie以及XSS后台管理系统的使用
- CUDA, NVIDIA driver, cudnn download address and version correspondence
猜你喜欢

DeNO 1.13.2 release

居家第二十三天的午饭

MySQL进阶之数据的增删改查(DML)

go interface

Xiaomi mobile phone has abandoned the "Mi" brand all over the world and switched to the full name brand of "Xiaomi"

C, print the source program of beautiful bell triangle

Addition, deletion, modification and query of advanced MySQL data (DML)

Matlab matrix index problem

Deep analysis of C language function

Question brushing plan -- backtracking method (I)
随机推荐
Introduce structured concurrency and release swift 5.5!
启牛学堂有用吗,推荐的证券账户是否安全
Xiaomi mobile phone has abandoned the "Mi" brand all over the world and switched to the full name brand of "Xiaomi"
Keywords static, extern + global and local variables
[SQL] string series 2: split a string into multiple lines according to specific characters
C, print the source program of beautiful bell triangle
学会打字后的思考
ubutnu20安装CenterNet
1.整理华子面经--1
Selenium displays webdriverwait
Write table of MySQL Foundation (create table)
Rust更适合经验较少的程序员?
一些接地气的话儿
DeNO 1.13.2 release
UKFslam
Google tries to use rust in Chrome
Send email to laravel
Problem brushing plan -- dynamic programming (IV)
【SDU Chart Team - Core】SVG属性类设计之枚举
setInterval、setTimeout、requestAnimationFrame