load_handcrafted_arch

behavenet.models.ae_model_architecture_generator.load_handcrafted_arch(input_dim, n_ae_latents, ae_arch_json, batch_size=None, check_memory=True, mem_limit_gb=10)[source]

Load handcrafted autoencoder architecture from a json file.

Parameters:
  • input_dim (array-like) – dimensions of image with shape (n_channels, y_pix, x_pix)

  • n_ae_latents (int) – number of autoencoder latents - fixed for all generated architectures

  • ae_arch_json (str) – path to ae architecture json

  • batch_size (int, optional) – expected batch size, to ensure that model and intermediate values will fit on gpu

  • check_memory (bool, optional) – True to check that the memory footprint of each architecture is below a certain threshold

  • mem_limit_gb (float, optional) – memory threshold in GB

Returns:

dict which fully defines a handcrafted architecture

Return type:

dict