Skip to content

How do I load a pre-trained model? #403

Closed Answered by btaba
eleninisioti asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @eleninisioti ! This is a great feature request that we haven't gotten around to implement – A model saver that saves the parameter config alongside the weights.

Here is an example of what the loader would do (where load_config_dict is to-be-implemented, and the whole thing needs to be wrapped in a nice function):

def make_inference_fn(
    observation_size: int,
    action_size: int,
    normalize_observations: bool = True,
    network_factory_kwargs: Optional[Dict[str, Any]] = None,
):
  normalize = lambda x, y: x
  if normalize_observations:
    normalize = running_statistics.normalize
  ppo_network = brax_networks.make_ppo_networks(
      observation_size,
      action_size,
      p…

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by eleninisioti
Comment options

You must be logged in to vote
1 reply
@btaba
Comment options

Comment options

You must be logged in to vote
5 replies
@AlexS28
Comment options

@arcman7
Comment options

@AlexS28
Comment options

@jihan1218
Comment options

@AlexS28
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants