scenic
scenic copied to clipboard
Running scenic models without downloading datasets
Is there a way to avoid the train_utils.get_dataset() call for running these models if I'm only interested in inference of trained models?
The problem I'm having is that the things that derive from class BaseModel (https://github.com/google-research/scenic/blob/31bbf1a79b1b984a0b4febe6ca1475577fb6121f/scenic/model_lib/base_models/base_model.py#L33) require a dataset_meta_data: Dict[str, Any], which requires an instance created by train_utils.get_dataset().
def __init__(
self,
config: Optional[ml_collections.ConfigDict],
dataset_meta_data: Dict[str, Any],
) -> None:
if config is None:
logging.warning('You are creating the model with default config.')
config = self.default_flax_model_config()
self.config = config
self.dataset_meta_data = dataset_meta_data
self.flax_model = self.build_flax_model()
+1.