Assume that I have two models in PyTorch, how can I load the weights of model 1 by weights of model 2 without saving the weights?
Like this:
model1.weights = model2.weights
In TensorFlow I can do this:
variables1 = model1.trainable_variablesvariables2 = model2.trainable_variablesfor v1, v2 in zip(variables1, variables2): v1.assign(v2.numpy())