the functions self.add_weight() now needs the name to be specified in the parameter. Ex. self.W = self.add_weight("weight", shape=[d, self.n_output_nodes]) gives "TypeError: Layer.add_weight() got multiple values for argument 'shape'" so instead use self.W = self.add_weight(name="weight", shape=[d, self.n_output_nodes])