Skip to main content

A small example package

Project description

moModelAnalysisTool

准备工作

pip install pqi
pqi use pypi 
pip install momodeltool / pip install momodeltool --upgrade

Visualization模块

通道可视化模块,使用举例:

from momodeltool import Visualization

'''使用开关'''
def forward(self, x):
  out = layer1(x)
  visual = Visualization()
  visual.switch_control()  # 打开展示开关,展示layer1
  visual.show_layer(out, module_name='layer1', show=True, save='./', pseudo=True, hist=True)
  visual.switch_control()  # 关闭展示开关,不展示layer2
  visual.show_layer(out, module_name='layer2', show=True, save='./', pseudo=True, hist=True) 
  out = layer2(out)
  visual.destroyAllWindows()  # 任意键入,关闭所有窗口

'''使用静态方法'''
def forward(self, x):
  out = layer1(x)
  Visualization.layer_show(out, module_name='layer1', show=True, save='./', pseudo=True, hist=True)  # 展示layer1,任意键入,关闭相关窗口
  out = layer2(out)

model.load_state_dict()
Visualization.kernel_show(model, module_name='test', show=Ture, save='./')

展示样例
Alt text Alt text

ModelProcess模块

网络模型处理模块,使用样例:

from momodeltool import ModelProcess

mp = ModelProcess()
model = stereonet(batch_size=1, cost_volume_method=cost_volume_method)
pretrained_model_path = "mypath/model_1340.pth"
new_model = mp.auto_adapt(model, pretrained_model_path)  # 自动调整权重
mp.show_keys(new)  # 展示模型权重key

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

momodeltool-0.0.12.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

momodeltool-0.0.12-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file momodeltool-0.0.12.tar.gz.

File metadata

  • Download URL: momodeltool-0.0.12.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for momodeltool-0.0.12.tar.gz
Algorithm Hash digest
SHA256 c4ec7343fd9ad77ff98165306f76dfde29252b49cd6a74fb957ada26d4db9397
MD5 246c76a767f493a843aa770d115d1683
BLAKE2b-256 e4c16471ed08dff8ebc810b573974d11d5503e50f07fe7cc374a6483bde77088

See more details on using hashes here.

Provenance

File details

Details for the file momodeltool-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for momodeltool-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d84b2e53e5b4bda93e0e35e977c44e22ce4644136c6c35432e8980bcbe4b3c
MD5 50d3eea5e949fde88ea0d9381d5f5e58
BLAKE2b-256 874159dc5b6eb67a98f634ea595fb578f3c8b3e52b3f1df176aa6cb264ab4459

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page