Add bias and activities as optional params in from_layer