PaperEdge icon indicating copy to clipboard operation
PaperEdge copied to clipboard

Question about 'Enet (Doc3D + DIW) + Tnet (Doc3D + DIW)' pipeline

Open Noah2018 opened this issue 1 year ago • 2 comments

Hi, May I ask how do you implement the Enet (Doc3D + DIW) + Tnet (Doc3D + DIW) pipeline with the training functions? I already run through the training model with the Enet (Doc3D + DIW) based on the pretrained model , but when it comes to Tnet, I don't know how can I transfer the Enet result(netG) to Tnet, take the code as example:

def train_L_step_w(engine, batch):
        #doc3d data
        .......
        # pass the global warp net
        netG.eval()
        dg = netG(x)

how do you make sure the netG here is the trained result, should I simplely replace the pretrained pt model in /models with my Enet trained result(.pt)? and should I use the 'trainer = Engine(train_G_step_w)' and 'trainer = Engine(train_L_step_w)' at the same time?

sry that some of my questions may be dumb, looking forward to hear from u

Noah2018 avatar Mar 14 '23 13:03 Noah2018

Basically after training Enet, you should create a new training config json file and point the Enet checkpoint: https://github.com/cvlab-stonybrook/PaperEdge/blob/main/configs/train.json#L7 https://github.com/cvlab-stonybrook/PaperEdge/blob/main/train.py#L50-L51 then in train_L_step_w the Enet is running with the weights from the previous step. (sry there are some name confusion for Enet, Gnet, Tnet, Lnet...train and eval have different names...)

train_L_step_w is enough. Do not use 2 engines at the same time...(at least I have not tried)

(sry it took me longer and longer to read all the emails...)

wkema avatar Apr 03 '23 01:04 wkema

thx for the reply I see, so what I did is correct, firstly I trained the Enet model and obtained the trained Enet model(pt), then I replace the G_ckpt in train.json with the trained Enet model(pt) and train the Tnet model. I also agree with you that we should not run the two trainers at the same time.

Noah2018 avatar Apr 03 '23 08:04 Noah2018