convert_weights
🗿
Convert VGG-Face
weights from LuaTorch
to PyTorch
.
Note
This is an adaptation of: https://github.com/chi0tzp/PyVGGFace/blob/master/convert_weights.py.
Author: Simon M. Hofmann Years: 2023
Functions:
Name | Description |
---|---|
convert_weights |
Convert |
download_torch_weights |
Download |
convert_weights
🗿
Convert LuaTorch
weights and load them into a PyTorch
model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path_to_weights
|
str | Path
|
filename of the pre-trained |
required |
model
|
VGGFace
|
|
required |
Returns:
Type | Description |
---|---|
VGGFace
|
|
Source code in code/facesim3d/modeling/VGG/convert_weights.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
download_torch_weights
🗿
download_torch_weights() -> Path
Download torch
weights for VGG-Face
if necessary.
Source code in code/facesim3d/modeling/VGG/convert_weights.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|