From cfb729c87adba4c9ba37d73eb2cc78e3866bf5b8 Mon Sep 17 00:00:00 2001 From: Amadeus <13202127055@163.com> Date: Thu, 29 Dec 2022 00:44:11 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8F=91=E5=B8=83]=20=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lightGE/core/__init__.py | 9 +++++++-- lightGE/data/__init__.py | 2 +- lightGE/utils/__init__.py | 8 ++++---- setup.py | 8 ++++++++ 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 setup.py diff --git a/lightGE/core/__init__.py b/lightGE/core/__init__.py index c0ed95d..85b412b 100644 --- a/lightGE/core/__init__.py +++ b/lightGE/core/__init__.py @@ -1,2 +1,7 @@ -from lightGE.core.nn import * -from lightGE.core.tensor import * +from lightGE.core.nn import Model, Sequential, Linear, Conv2d, MaxPool2d, AvgPool2d, LSTM, Tanh, Sigmoid, ReLu, \ + BatchNorm1d, BatchNorm2d, Dropout, Dropout2d +from lightGE.core.tensor import Tensor, Op, AddOp, SubOp, MulOp, DivOp, PowOp, NegOp, MatMulOp, SumOp, MeanOp, \ + TransposeOp, ReshapeOp, SqueezeOp, UnsqueezeOp, LogOp, ExpOp, \ + SoftmaxOp, AbsOp, MaxOp, VarOp, SqrtOp, ReLuOp, Conv2dOp, CosOp, SinOp, MaxPool2dOp, AvgPool2dOp, \ + log, exp, abs, max, var, sqrt, cos, sin, sum, mean, softmax, tanh, sigmoid, relu, conv2d, max_pool2d, avg_pool2d, \ + TcGraph diff --git a/lightGE/data/__init__.py b/lightGE/data/__init__.py index b4cc0c7..62557af 100644 --- a/lightGE/data/__init__.py +++ b/lightGE/data/__init__.py @@ -1 +1 @@ -from lightGE.data.dataloader import * +from lightGE.data.dataloader import Dataset, DataLoader diff --git a/lightGE/utils/__init__.py b/lightGE/utils/__init__.py index 72fb17e..ca172d3 100644 --- a/lightGE/utils/__init__.py +++ b/lightGE/utils/__init__.py @@ -1,4 +1,4 @@ -from lightGE.utils.loss import * -from lightGE.utils.optimizer import * -from lightGE.utils.scheduler import * -from lightGE.utils.trainer import * +from lightGE.utils.loss import mseLoss, maeLoss, crossEntropyLoss, huberLoss, nll_loss +from lightGE.utils.optimizer import Optimizer, SGD, Adam, AdaGrad, RMSprop, SGDMomentum +from lightGE.utils.scheduler import Scheduler, MultiStepLR, StepLR, Exponential, Cosine, LambdaLR, ReduceLROnPlateau +from lightGE.utils.trainer import Trainer diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f21d1b6 --- /dev/null +++ b/setup.py @@ -0,0 +1,8 @@ +from distutils.core import setup + +setup( + name='LightGE', + version='0.1', + packages=['lightGE', 'LightGE.core', 'LightGE.data', 'LightGE.utils'], + url='https://gitlab.com/l7829936101/nnengine' +)