Thank you for your excellent work. I am trying to get my hands on StyleganXL and I am trying to get the intermediate features of the pretrained StyleganXL. However, I am a little confused about the loading procedure and the @persistence decorator.
As I understand, the source code saved in pickle will be used when loading a persistence class. I can refer to the following code to get the pretrained intermediate feature. I should first load the pretrained StyleganXL. Then define a new network which modified the source code and outputs features.
with open('old_pickle.pkl', 'rb') as f:
old_net = pickle.load(f)
new_net = MyNetwork(*old_obj.init_args, **old_obj.init_kwargs)
misc.copy_params_and_buffers(old_net, new_net, require_all=True)
However, I noticed in networks_stylegan3.py, initializing the Generator relys on in_embeddings/tf_efficientnet_lite0.pkl. What does this pkl do? And how can I implement the above function?
Thank you for your excellent work. I am trying to get my hands on StyleganXL and I am trying to get the intermediate features of the pretrained StyleganXL. However, I am a little confused about the loading procedure and the @persistence decorator.
As I understand, the source code saved in pickle will be used when loading a persistence class. I can refer to the following code to get the pretrained intermediate feature. I should first load the pretrained StyleganXL. Then define a new network which modified the source code and outputs features.
However, I noticed in
networks_stylegan3.py
, initializing the Generator relys onin_embeddings/tf_efficientnet_lite0.pkl
. What does this pkl do? And how can I implement the above function?