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_variables
variables2 = model2.trainable_variables
for v1, v2 in zip(variables1, variables2):
v1.assign(v2.numpy())