by KingYen.
form QIT Software Studio
.
├── README.md
├── __pycache__
│ ├── function.cpython-311.pyc
│ ├── utils.cpython-311.pyc
│ └── variable.cpython-311.pyc
├── environment.yaml
├── function.py
├── main.py
├── tests
│ ├── __pycache__
│ │ └── test_square.cpython-311.pyc
│ └── test_square.py
├── utils.py
└── variable.py
- Make sure you have configured your 'Anaconda' environment
- run it
conda env create -f environment.yaml
- Write the main file, such as this file
from function import square, exp from variable import Variable x = Variable(0.5) y = square(exp(square(x))) y.backward() print(x.grad)
- Run main.go
python main.py
- Run the unit test
python -m unittest discover tests