fix warning on Layer initialization for sparse data layer