Open sweep-nightly[bot] opened 11 months ago
src/cnn.py
. ✓
Sandbox logs for https://github.com/sweepai/evals/commit/53a51f83660463ee172624f01374b0d7e1f17f76
trunk fmt src/cnn.py || exit 0
1/2 ✓✔ Formatted src/cnn.py Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix --filter=-ruff --print-failures src/cnn.py
2/2 ✓Checked 1 file ✔ No issues
[X] Ran sandbox for src/main.py
. ✗
Run `src/main.py` through the sandbox.
[X] Ran sandbox for src/api.py
. ✗
Run `src/api.py` through the sandbox.
Description
This pull request adds a new CNN class to the
cnn.py
file and integrates it into themain.py
andapi.py
files. The CNN class is responsible for training a convolutional neural network on the MNIST dataset.Summary
import
statements for necessary modules incnn.py
CNN
class incnn.py
that extendsnn.Module
CNN
class with two convolutional layers, max pooling, and fully connected layersCNN
classtrain_cnn
method in theCNN
class to train the CNN using the MNIST datasettrain_cnn
methodtransform
object incnn.py
to preprocess the MNIST datasettrainloader
incnn.py
CNN
class and called thetrain_cnn
method incnn.py
Fixes #9.
🎉 Latest improvements to Sweep:
rope
library to refactor Python! Check out Large Language Models are Bad at Refactoring Code. To have Sweep refactor your code, trysweep: Refactor <your_file>.py
!💡 To get Sweep to edit this pull request, you can: