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