79446388

Date: 2025-02-17 19:16:39
Score: 1.5
Natty:
Report link

To use the weights from model1 in model2 with Tensorflow 2.18:

model2 = Sequential()
    
model2.add(Conv2D(10,kernel_size=(3, 3), activation="sigmoid",        
input_shape=(28, 28, 1)))

The weights should be set after the layer is created

model2.set_weights(model1.layers[0].get_weights())
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Giulio Quirici