Added sanity check to set_layerwise _option in trainable