At present, tensors with same content are allocated separated for each layer. This is a waste of memory.