Skip to content

Conversation

@dreamer2368
Copy link
Collaborator

@dreamer2368 dreamer2368 commented Nov 21, 2024

Neural network module

lasdi.networks module provides various NN modules that can be combined into encoder/decoder.

  • MultiLayerPerceptron class is moved from previous lasdi.latent_space module.
  • CNN2D class is newly added for 2D convolutional neural networks.
    • channels/kernel sizes for Conv2d are automatically determined from given architecture.
      • class methods compute_kernel_size, compute_input_layer_size, compute_output_layer_size compute the resulting kernel/input layer/output layer size based on given architecture.
    • NOTE torch.nn.Conv2d only takes 3d-/4d- tensors, while training data can have more flexible shapes.
      • Before training, the training data shape must be passed via CNN2D.set_data_shape, so that the data can be properly reshape to/from 3d-/4d tensors.
  • Fully documented according to numpy style.

LatentSpace base class

  • Latent space classes are moved to submodule lasdi.latent_space.
  • Base class LatentSpace provides the basic skeleton of latent space classes.
  • Documentation will be done in future PRs.

Conv2DAutoencoder class

  • Derived class of LatentSpace
  • Encoder: CNN2D - MultiLayerPerceptron
  • Decoder: MultiLayerPerceptron - CNN2D
  • NOTE: Before training, the training data shape must be passed via Conv2DAutoencoder.set_batch_shape.

Miscellaneous change

  • CI workflow for unit tests
  • CNN2D unit tests
  • BayesianGLaSDI save loss history and load it from restart file. Training appends from the loaded loss history.

@dreamer2368 dreamer2368 changed the title Cae 2D Convolutional Autoencoder Nov 21, 2024
@dreamer2368 dreamer2368 marked this pull request as ready for review November 22, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants