Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D Convolutional Autoencoder #20

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

2D Convolutional Autoencoder #20

wants to merge 15 commits into from

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.

1 participant