class_docstr: PolyVit model.
class_docstr_tok: ["PolyVit","model","."]
docstr: Updates the train_state with data from restored_train_state (PolyViT).
docstr_tok: ["Updates","the","train_state","with","data","from","restored_train_state","(","PolyViT",")","."]
code: def init_from_polyvit_train_state(
      self,
      train_state: Any,
      restored_train_state: Any,
      tokenizer_to_init_from: Optional[str] = None,
      tokenizer_to_init: Optional[str] = None,
      resolution_to_init: Optional[Any] = None,
      initialize_heads: bool = False,
  ) -> Any:
      """Updates the train_state with data from restored_train_state (PolyViT)."""
  
      return model_utils.initialize_from_polyvit_train_state(
          train_state,
          restored_train_state,
          tokenizer_to_init_from=tokenizer_to_init_from,
          tokenizer_to_init=tokenizer_to_init,
          resolution_to_init=resolution_to_init,
          initialize_heads=initialize_heads,
      )
  
file_path: scenic/scenic/projects/polyvit/model.py
imports: from typing import Any, Callable, Optional, Sequence
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  from scenic.projects.polyvit import layers
  from scenic.projects.polyvit import model_utils
  from scenic.projects.polyvit import polyvit_base_model
label_desc: Use image node_id 3 for calling the PolyVitModel obj's underlying member method code with example usage: obj.init_from_polyvit_train_state(train_state, restored_train_state, tokenizer_to_init_from, tokenizer_to_init, resolution_to_init, initialize_heads) and returns: model_utils