- Extract the weights and biases from the first model using the ‘getwb’ function.
- Create the new network with the updated input size using the ‘fitnet’ method. The ‘fitnet’ method returns a function fitting neural network with a new hidden layer size.
- Initialize the new network with the extracted weights using the ‘setwb’ function. You may need to adjust the weights to match the new input size accordingly.
- Train the new network with the updated input data.
- ‘getwb’: https://www.mathworks.com/help/deeplearning/ref/getwb.html
- ‘fitnet’: https://www.mathworks.com/help/deeplearning/ref/fitnet.html
- ‘setwb’: https://www.mathworks.com/help/deeplearning/ref/setwb.html
- Initialize neural network to set of weights: https://www.mathworks.com/matlabcentral/answers/50961-how-to-initialize-the-neural-network-to-a-set-of-weights
- Set a specific weight for a connection in neural networks: https://www.mathworks.com/matlabcentral/answers/499607-set-a-specific-weight-for-a-connection-in-neural-networks