Using custom pretrained model in a lightning module #17443
Unanswered
anupsingh15
asked this question in
code help: CV
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folk!
I have a pre-trained model (class A), which I use in another model(class B) for its training. Herunder is the code snippet I use to train model B. I am a bit confused with regard to using forward() and predict_step() in class A to generate model A output to be used in model B. Please let me know if the code snippet mentioned hereunder is correct.
I am asking this because I don't get the desired results using this pipeline, contrary to when I generate a database explicitly using
model_A
and trainmodel_B
using it, i.e., I don't passmodel_A
toclass B
. I mainly want to use the above pipeline, wheremodel_A
should just be used as a sample generator whose output can be fed into model_B for its training.Also, I would like to know what changes I need to make in the
shared_step
ofclass B
if I usepredict_step()
instead offorward()
inclass A
.Beta Was this translation helpful? Give feedback.
All reactions