Skip to content

Add jittor #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5f15e97
Jittor backend 'jittor_backend.py' is added.
QuantumLiu Feb 18, 2024
af9a586
Created Jittor_nn.py File. The file is a copy of oneflow_nn.py. the c…
hishambarakat16 Mar 6, 2024
7b55016
removed jitter_backend.py. This file is no longer needed and was crea…
hishambarakat16 Mar 6, 2024
33e4d35
Integration Progress uptill line 2000
hishambarakat16 Mar 7, 2024
157ec0b
Finished wirting the code for Jittor_nn.py and changed the name to ji…
hishambarakat16 Mar 8, 2024
5d946bd
Added jittor loss 'jittor_cost.py'
hishambarakat16 Mar 8, 2024
be15628
Added jittor metrics jittor_metrics.py
hishambarakat16 Mar 8, 2024
b9f4bb5
Changed desc on jittor_nn.py
hishambarakat16 Mar 10, 2024
49f95c8
Added jittor to load_backend.py
hishambarakat16 Mar 10, 2024
00647a3
modified __init__.py and added jittor version
hishambarakat16 Mar 10, 2024
863c509
updated jittor_backend.py and removed complex64 and complex128
hishambarakat16 Mar 10, 2024
92b0613
jittor_backend updated
hishambarakat16 Mar 10, 2024
4cead40
Added core_jittor.py and jittor_initializers.py
hishambarakat16 Mar 10, 2024
278ce4b
updated load_initializers.py
hishambarakat16 Mar 10, 2024
7407a51
Updated core/__init__py
hishambarakat16 Mar 10, 2024
0a66e51
Added /vision/ops/jittor_ops.py
hishambarakat16 Mar 10, 2024
066c392
Updated __init__py files for losses, metrics, model core, model utils…
hishambarakat16 Mar 10, 2024
7e73b24
Updating files to fix minor bugs
hishambarakat16 Apr 14, 2024
2e1832d
Updated Core_Jittor.py and enabled Activation Functions to function a…
hishambarakat16 Jun 25, 2024
0211bdf
Updated dataflow/utils.py and added jittor
hishambarakat16 Jun 25, 2024
d70b8fb
Updated Jittor_nn, dataflow/Utils and jittor_Cost
hishambarakat16 Jun 25, 2024
480645d
updated Jittor with WithGrad, TrainOneStep and TrainOneStepWithGradi…
hishambarakat16 Jun 29, 2024
8946a63
Updating Jittor Optimizer to intergrate Adam
hishambarakat16 Jun 29, 2024
c8b6108
modfied core.py to integrate jittor optmizer. updated jittor metrics.
hishambarakat16 Jul 4, 2024
b907adf
Patching bugs (post Utilities test)
hishambarakat16 Jul 24, 2024
772af7a
updated jittor to load save weights of model
hishambarakat16 Jul 31, 2024
80f3f6c
add_Jittor: Passing model tests, Parameter and Module Container test
hishambarakat16 Aug 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
411 changes: 260 additions & 151 deletions examples/basic_tutorials/cifar10_cnn.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion examples/basic_tutorials/cifar10_cnn_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# -*- coding: utf-8 -*-

import os
os.environ['TL_BACKEND'] = 'paddle'
# os.environ['TL_BACKEND'] = 'paddle'
os.environ['TL_BACKEND'] = 'jittor'
# os.environ['TL_BACKEND'] = 'tensorflow'
# os.environ['TL_BACKEND'] = 'mindspore'
# os.environ['TL_BACKEND'] = 'torch'
Expand Down
9 changes: 7 additions & 2 deletions examples/basic_tutorials/cifar10_cnn_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
# TensorlayerX目前支持包括TensorFlow、Pytorch、PaddlePaddle、MindSpore作为计算后端,指定计算后端的方法也非常简单,只需要设置环境变量即可

import os
os.environ['TL_BACKEND'] = 'paddle'
# os.environ['TL_BACKEND'] = 'paddle'

os.environ['TL_BACKEND'] = 'jittor'
# os.environ['TL_BACKEND'] = 'tensorflow'
# os.environ['TL_BACKEND'] = 'mindspore'
# os.environ['TL_BACKEND'] = 'torch'



import tensorlayerx as tlx
from tensorlayerx.nn import Module
from tensorlayerx.nn import (Conv2d, Linear, Flatten, MaxPool2d, BatchNorm2d)
Expand Down Expand Up @@ -54,6 +58,7 @@ def forward(self, x):
z = self.linear1(z)
z = self.linear2(z)
return z



# get the network
Expand All @@ -70,7 +75,7 @@ def forward(self, x):

# 定义损失函数、优化器等
loss_fn=tlx.losses.softmax_cross_entropy_with_logits
optimizer = tlx.optimizers.Adam(learning_rate)
optimizer = tlx.optimizers.Adam(lr=learning_rate)
metrics = tlx.metrics.Accuracy()


Expand Down
3 changes: 2 additions & 1 deletion examples/basic_tutorials/gradient_clip_mixed_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# -*- coding: utf-8 -*-
# The tensorlayerx and tensorflow operators can be mixed
import os
os.environ['TL_BACKEND'] = 'tensorflow'
# os.environ['TL_BACKEND'] = 'tensorflow'
# os.environ['TL_BACKEND'] = 'paddle'
# os.environ['TL_BACKEND'] = 'torch'
os.environ['TL_BACKEND'] = 'jittor'


import time
Expand Down
Loading