zengrad-tensorflow 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.1
2
+ Name: zengrad-tensorflow
3
+ Version: 0.0.0
4
+ Summary: ZenGrad Optimizer - TensorFlow
5
+ Home-page: https://github.com/Poorni-Murumuri/ZenGrad
6
+ Author: Murumuri Naga Poorni
7
+ Author-email: poorni.m0405@gmail.com
8
+ License: Apache-2.0
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: tensorflow>=2.10.0
18
+ Requires-Dist: keras>=2.10.0
19
+
20
+
21
+ # ZenGrad: Gradient Descent Optimizer
22
+
23
+ ZenGrad is a reliable and efficient gradient descent optimizer designed to improve the stability and performance of deep learning models. It focuses on providing smooth and consistent updates during training, reducing the chances of sudden or unstable changes that can slow down convergence. With its adaptive nature, ZenGrad adjusts to the loss landscape in real time, helping models learn more effectively and reach better performance. Built for seamless integration with TensorFlow, it fits easily into existing machine learning workflows, making it a strong choice for both research and practical applications that demand stable and efficient optimization.
24
+
25
+
26
+ ## Installation
27
+
28
+ To install ZenGrad, run the following command:
29
+
30
+ ```bash
31
+ pip install zengrad-tensorflow
32
+ ```
33
+
34
+ ## Implementation
35
+
36
+ ```python
37
+ from zengrad_tensorflow import ZenGrad # Import the ZenGrad optimizer
38
+
39
+ # Define your preferred model architecture here (e.g., CNN, ResNet, LSTM, Transformer, etc.)
40
+ # Example:
41
+ # model = ...
42
+
43
+ # Compile your model using ZenGrad
44
+ model.compile(
45
+ optimizer=ZenGrad(learning_rate=0.01, weight_decay=1e-4),
46
+ .......
47
+ )
48
+
49
+ ```
50
+
51
+ ## License
52
+
53
+ ZenGrad is released under the [Apache License 2.0](https://github.com/Poorni-Murumuri/ZenGrad/blob/main/LICENSE).
@@ -0,0 +1,34 @@
1
+
2
+ # ZenGrad: Gradient Descent Optimizer
3
+
4
+ ZenGrad is a reliable and efficient gradient descent optimizer designed to improve the stability and performance of deep learning models. It focuses on providing smooth and consistent updates during training, reducing the chances of sudden or unstable changes that can slow down convergence. With its adaptive nature, ZenGrad adjusts to the loss landscape in real time, helping models learn more effectively and reach better performance. Built for seamless integration with TensorFlow, it fits easily into existing machine learning workflows, making it a strong choice for both research and practical applications that demand stable and efficient optimization.
5
+
6
+
7
+ ## Installation
8
+
9
+ To install ZenGrad, run the following command:
10
+
11
+ ```bash
12
+ pip install zengrad-tensorflow
13
+ ```
14
+
15
+ ## Implementation
16
+
17
+ ```python
18
+ from zengrad_tensorflow import ZenGrad # Import the ZenGrad optimizer
19
+
20
+ # Define your preferred model architecture here (e.g., CNN, ResNet, LSTM, Transformer, etc.)
21
+ # Example:
22
+ # model = ...
23
+
24
+ # Compile your model using ZenGrad
25
+ model.compile(
26
+ optimizer=ZenGrad(learning_rate=0.01, weight_decay=1e-4),
27
+ .......
28
+ )
29
+
30
+ ```
31
+
32
+ ## License
33
+
34
+ ZenGrad is released under the [Apache License 2.0](https://github.com/Poorni-Murumuri/ZenGrad/blob/main/LICENSE).
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,28 @@
1
+
2
+ from setuptools import setup, find_packages
3
+
4
+ setup(
5
+ name='zengrad-tensorflow',
6
+ version='0.0.0',
7
+ description='ZenGrad Optimizer - TensorFlow',
8
+ long_description=open('README.md', encoding='utf-8').read(),
9
+ long_description_content_type='text/markdown',
10
+ author='Murumuri Naga Poorni',
11
+ author_email='poorni.m0405@gmail.com',
12
+ packages=find_packages(),
13
+ url='https://github.com/Poorni-Murumuri/ZenGrad',
14
+ license="Apache-2.0",
15
+ install_requires=[
16
+ 'tensorflow>=2.10.0',
17
+ 'keras>=2.10.0',
18
+ ],
19
+ classifiers=[
20
+ 'Programming Language :: Python :: 3',
21
+ "License :: OSI Approved :: Apache Software License",
22
+ 'Operating System :: OS Independent',
23
+ 'Intended Audience :: Developers',
24
+ 'Intended Audience :: Science/Research',
25
+ 'Topic :: Scientific/Engineering :: Artificial Intelligence',
26
+ ],
27
+ python_requires='>=3.6',
28
+ )
@@ -0,0 +1 @@
1
+ from .zengrad_tensorflow import ZenGrad
@@ -0,0 +1,72 @@
1
+ import tensorflow as tf
2
+ from keras import layers, models
3
+ from keras.src import initializers, ops
4
+ from keras.src.optimizers import optimizer
5
+
6
+ class ZenGrad(optimizer.Optimizer):
7
+ def __init__(
8
+ self,
9
+ learning_rate=0.01,
10
+ initial_accumulator_value=0.1,
11
+ weight_decay=1e-4,
12
+ epsilon=1e-8,
13
+ name="ZenGrad",
14
+ **kwargs,
15
+ ):
16
+ super().__init__(
17
+ learning_rate=learning_rate,
18
+ name=name,
19
+ **kwargs,
20
+ )
21
+ self.initial_accumulator_value = initial_accumulator_value
22
+ self.weight_decay = weight_decay
23
+ self.epsilon = epsilon
24
+
25
+ def build(self, var_list):
26
+ if self.built:
27
+ return
28
+ super().build(var_list)
29
+ self._accumulators = []
30
+ initializer = initializers.Constant(self.initial_accumulator_value)
31
+ for var in var_list:
32
+ self._accumulators.append(
33
+ self.add_variable(
34
+ name="accumulator",
35
+ shape=var.shape,
36
+ dtype=var.dtype,
37
+ initializer=initializer,
38
+ )
39
+ )
40
+
41
+ def update_step(self, gradient, variable, learning_rate):
42
+ lr = ops.cast(learning_rate, variable.dtype)
43
+ gradient = ops.cast(gradient, variable.dtype)
44
+
45
+ accumulator = self._accumulators[self._get_variable_index(variable)]
46
+
47
+ # A_t = A_{t-1} + g_t^2
48
+ self.assign_add(accumulator, ops.square(gradient))
49
+
50
+ # Optional: decoupled weight decay
51
+ if self.weight_decay > 0.0:
52
+ self.assign_sub(variable, variable * lr * self.weight_decay)
53
+
54
+ # Effective learning rate and parameter update
55
+ self.assign_sub(
56
+ variable,
57
+ ops.divide(
58
+ ops.multiply(lr, gradient),
59
+ ops.add(ops.log(ops.add(accumulator, 1.0)), self.epsilon),
60
+ ),
61
+ )
62
+
63
+ def get_config(self):
64
+ config = super().get_config()
65
+ config.update(
66
+ {
67
+ "initial_accumulator_value": self.initial_accumulator_value,
68
+ "weight_decay": self.weight_decay,
69
+ "epsilon": self.epsilon,
70
+ }
71
+ )
72
+ return config
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.1
2
+ Name: zengrad-tensorflow
3
+ Version: 0.0.0
4
+ Summary: ZenGrad Optimizer - TensorFlow
5
+ Home-page: https://github.com/Poorni-Murumuri/ZenGrad
6
+ Author: Murumuri Naga Poorni
7
+ Author-email: poorni.m0405@gmail.com
8
+ License: Apache-2.0
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: tensorflow>=2.10.0
18
+ Requires-Dist: keras>=2.10.0
19
+
20
+
21
+ # ZenGrad: Gradient Descent Optimizer
22
+
23
+ ZenGrad is a reliable and efficient gradient descent optimizer designed to improve the stability and performance of deep learning models. It focuses on providing smooth and consistent updates during training, reducing the chances of sudden or unstable changes that can slow down convergence. With its adaptive nature, ZenGrad adjusts to the loss landscape in real time, helping models learn more effectively and reach better performance. Built for seamless integration with TensorFlow, it fits easily into existing machine learning workflows, making it a strong choice for both research and practical applications that demand stable and efficient optimization.
24
+
25
+
26
+ ## Installation
27
+
28
+ To install ZenGrad, run the following command:
29
+
30
+ ```bash
31
+ pip install zengrad-tensorflow
32
+ ```
33
+
34
+ ## Implementation
35
+
36
+ ```python
37
+ from zengrad_tensorflow import ZenGrad # Import the ZenGrad optimizer
38
+
39
+ # Define your preferred model architecture here (e.g., CNN, ResNet, LSTM, Transformer, etc.)
40
+ # Example:
41
+ # model = ...
42
+
43
+ # Compile your model using ZenGrad
44
+ model.compile(
45
+ optimizer=ZenGrad(learning_rate=0.01, weight_decay=1e-4),
46
+ .......
47
+ )
48
+
49
+ ```
50
+
51
+ ## License
52
+
53
+ ZenGrad is released under the [Apache License 2.0](https://github.com/Poorni-Murumuri/ZenGrad/blob/main/LICENSE).
@@ -0,0 +1,9 @@
1
+ README.md
2
+ setup.py
3
+ zengrad_tensorflow/__init__.py
4
+ zengrad_tensorflow/zengrad_tensorflow.py
5
+ zengrad_tensorflow.egg-info/PKG-INFO
6
+ zengrad_tensorflow.egg-info/SOURCES.txt
7
+ zengrad_tensorflow.egg-info/dependency_links.txt
8
+ zengrad_tensorflow.egg-info/requires.txt
9
+ zengrad_tensorflow.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ tensorflow>=2.10.0
2
+ keras>=2.10.0
@@ -0,0 +1 @@
1
+ zengrad_tensorflow