Created
May 22, 2024 20:42
-
-
Save Eeman1113/12b38103d2f021a1b3bed49a1dd60ea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from norch.tensor import Tensor | |
from norch.utils import utils | |
import random | |
class Parameter(Tensor): | |
""" | |
A parameter is a trainable tensor. | |
""" | |
def __init__(self, shape): | |
data = utils.generate_random_list(shape=shape) | |
super().__init__(data, requires_grad=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment