I am rather new to using Keras - sorry if this is a bad model design, or my issue is an easy fix.
I am using Keras_core, with torch as the backend. I am trying to concatenate two layers, which each have 2 outputs. I get no errors when training this model, and am able to save it. But, when I try to load it in a different python program, I get the following error: ValueError: A merge layer should be called on a list of inputs. Received: input_shape=[[None, 2], [None, 2]] (not a list of shapes). When I try to train and load the same model structure, trained on the same data with standard Keras from TensorFlow, I get no errors. If anyone has any insight into why this is happening that would be greatly appreciated!
If more background is needed, here is the general structure I am trying to implement:
I want the final model to take as input 4 values, and output 2 values from this: output1 and output2. I have 2 datasets, one which has good values for output1, but bad for output2, and another which has good values for output2, but bad values for output1. I want my model to be structured as follows:
Input layer of 4 values feeds into 2 branches with a series of dense layers. Final output of each branch is 2 values. I then concatenate these 2 branches into 4 total values, and feed this through another set of Dense layers to get my final 2 outputs. Goal would be to set one branch as trainable at a time, and train based on each of the datasets, so that branch1 performs well on output1 and branch2 performs well on output2. Then, train the final merged section based on a third set of data, which performs well on both outputs but doesn't have much training data.
Any help would be amazing!!