Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Noah2018 opened this issue Mar 14, 2023 · 2 comments
Open

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

Noah2018 opened this issue Mar 14, 2023 · 2 comments

Comments

@Noah2018
Copy link

Noah2018 commented Mar 14, 2023

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

@wkema
Copy link
Collaborator

wkema commented Apr 3, 2023

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...)

@Noah2018
Copy link
Author

Noah2018 commented Apr 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants