{"id":28744884,"url":"https://github.com/mvanzulli/tpinn","last_synced_at":"2025-06-16T12:08:19.800Z","repository":{"id":204313691,"uuid":"686118536","full_name":"mvanzulli/TPINN","owner":"mvanzulli","description":"This repository contains an implementation of Tensorized Physics Informed Neural Networks (TPINNs) for solving physics-based problem","archived":false,"fork":false,"pushed_at":"2023-09-02T23:03:36.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-29T17:27:57.154Z","etag":null,"topics":["physics-informed-neural-networks","quantum-inspired-algorithm","tensor-networks","tensorflow2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvanzulli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-01T19:42:41.000Z","updated_at":"2023-10-29T17:27:59.773Z","dependencies_parsed_at":null,"dependency_job_id":"9efae0df-da89-4469-8cc8-7e84dbb9fa7d","html_url":"https://github.com/mvanzulli/TPINN","commit_stats":null,"previous_names":["mvanzulli/tpinn"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/mvanzulli/TPINN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvanzulli%2FTPINN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvanzulli%2FTPINN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvanzulli%2FTPINN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvanzulli%2FTPINN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvanzulli","download_url":"https://codeload.github.com/mvanzulli/TPINN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvanzulli%2FTPINN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260158335,"owners_count":22967229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["physics-informed-neural-networks","quantum-inspired-algorithm","tensor-networks","tensorflow2"],"created_at":"2025-06-16T12:08:19.037Z","updated_at":"2025-06-16T12:08:19.779Z","avatar_url":"https://github.com/mvanzulli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tensorized Deep Physics Informed Neural Networks :atom:\n\nThis repository contains an implementation of Tensorized Physics Informed Neural Networks (TPINNs) for solving physics-based problems. TPINNs combine the power of neural networks with the physical laws governing the system to improve accuracy and generalization. :rocket:\n\n## :books: Introduction\nTensorized Physics Informed Neural Networks (TPINNs) are a class of neural networks that incorporate known physical laws into their architecture. By including the governing equations of a system as constraints, TPINNs can solve complex physics-based problems more accurately than traditional neural networks. This repository provides an implementation of TPINNs using TensorFlow. :infinity:\n\n## :heavy_check_mark: Requirements\nTo run the code in this repository, you need the following dependencies:\n- Python (\u003e= 3.6)\n- TensorFlow (\u003e= 2.0)\n- NumPy (\u003e= 1.18)\n\n## :floppy_disk: Installation\n1. Clone the repository:\n   ```\n   git clone git@github.com:mvanzulli/TPINN.git\n   ```\n2. Navigate to the project directory:\n   ```\n   cd TPINN\n   ```\n3. Install the required dependencies:\n   ```\n   pip install -r requirements.txt\n   ```\n\n## :computer: Usage\nTo utilize TPINNs in your own projects, follow these steps:\n\n1. Import the necessary modules:\n   ```python\n   import tensorflow as tf\n   import numpy as np\n   from tn_layer import TNLayer\n   from tn_model import TNModel\n   ```\n\n2. Create an instance of the TNLayer class:\n   ```python\n   tn_layer = TNLayer(input_dim, bond_dim, activation, kernel_initializer, use_bias, bias_initializer)\n   ```\n\n   Replace the arguments with the desired values. `input_dim` is the dimensionality of the input tensor, `bond_dim` is the bond dimension of the TN layer, `activation` is the activation function to use, `kernel_initializer` is the initializer for the weight matrices, `use_bias` specifies whether to include a bias term, and `bias_initializer` is the initializer for the bias term.\n\n3. Create an instance of the TNModel class:\n   ```python\n   tn_model = TNModel(num_layers, MPO_units, output_dim, bond_dim, activation, use_bias, kernel_initializer, bias_initializer, dif_equation)\n   ```\n\n   Replace the arguments with the desired values. `num_layers` is the number of TN layers, `MPO_units` is the number of units in the MPO tensor, `output_dim` is the dimension of the output, `bond_dim` is the bond dimension of the TN layer (optional), `activation` is the activation function to use, `use_bias` specifies whether to include a bias term, `kernel_initializer` is the initializer for the weight matrices, `bias_initializer` is the initializer for the bias term, and `dif_equation` is a callable representing the one-dimensional fourth-order PDE.\n\n4. Use the TNModel to perform forward pass and compute the PDE loss:\n   ```python\n   y_pred = tn_model.call(x)\n   pde_loss = tn_model.compute_pde_loss(x)\n   ```\n\n   Replace `x` with the input tensor.\n\n## :rocket: Examples\nAn example usage of TPINNs can be found in the `examples` directory. It demonstrates how to solve a physics-based problem using TPINNs.\n\n## :busts_in_silhouette: Contributing\nContributions to this repository are welcome. Feel free to open issues or submit pull requests.\n\n## :page_with_curl: License\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvanzulli%2Ftpinn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvanzulli%2Ftpinn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvanzulli%2Ftpinn/lists"}