Skip to content

Commit

Permalink
Merge pull request #21 from Vivswan/master
Browse files Browse the repository at this point in the history
v1.0.1 (Patches for PyTorch 2.0.0)
  • Loading branch information
Vivswan committed Mar 27, 2023
2 parents 8ed52ea + 68aa611 commit cbbd394
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## 1.0.0
* Public release

* Public release
## 1.0.1 (Patches for Pytorch 2.0.0)
* added `grad.setter` to `PseudoParameterModule` class
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pip install analogvnn

![3 Layered Linear Photonic Analog Neural Network](docs/_static/analogvnn_model.png)

[//]: # (![3 Layered Linear Photonic Analog Neural Network](https://github.com/Vivswan/AnalogVNN/raw/v1.0.0/docs/_static/analogvnn_model.png))
[//]: # (![3 Layered Linear Photonic Analog Neural Network](https://github.com/Vivswan/AnalogVNN/raw/release/docs/_static/analogvnn_model.png))

## Abstract

Expand Down
10 changes: 10 additions & 0 deletions analogvnn/parameter/PseudoParameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ def grad(self):

return self._transformed.grad

@grad.setter
def grad(self, grad: Tensor):
"""Sets the gradient of the parameter.
Args:
grad (Tensor): the gradient.
"""

self._transformed.grad = grad

@property
def module(self):
"""Returns the module.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ py-modules = ['analogvnn']
[project]
# $ pip install analogvnn
name = "analogvnn"
version = "1.0.0"
version = "1.0.1"
description = "A fully modular framework for modeling and optimizing analog/photonic neural networks" # Optional
readme = "README.md"
requires-python = ">=3.7"
Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--extra-index-url https://download.pytorch.org/whl/cu116
--extra-index-url https://download.pytorch.org/whl/cu118
torch
torchvision~=0.14.0
torchvision
torchaudio
numpy
scipy
Expand All @@ -11,5 +11,6 @@ importlib-metadata; python_version < '3.8'
tensorflow>=2.0.0
tensorboard>=2.0.0
torchinfo
# conda install graphviz
# conda install graphviz python-graphviz pydot pydotplus python-dotenv
# conda install --channel conda-forge pygraphviz
graphviz

0 comments on commit cbbd394

Please sign in to comment.