Shortcuts

Tutorial 6: Useful tools

In this tutorial, we introduce some useful tools for users.

The structure of this guide are as follows:

Prepare a model for publishing

Before you upload a model to AWS, you may want to

  1. convert model weights to CPU tensors

  2. delete the optimizer states and

  3. compute the hash of the checkpoint file and append time and the hash id to the filename.

tools/publish_model.py helps users to prepare their model for publishing.

python tools/publish_model.py ${INPUT_FILENAME} ${OUTPUT_FILENAME}

An Example:

python tools/publish_model.py work_dirs/stylegan2/latest.pth stylegan2_c2_8xb4_ffhq-1024x1024.pth

The final output filename will be stylegan2_c2_8xb4_ffhq-1024x1024_{time}-{hash id}.pth.

Read the Docs v: 1.x
Versions
latest
stable
1.x
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.