Skip to content

Commit

Permalink
add activation to version_control
Browse files Browse the repository at this point in the history
  • Loading branch information
husichao666 committed Oct 16, 2023
1 parent 7bbbd1c commit 15036e5
Show file tree
Hide file tree
Showing 5 changed files with 1,688 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mindpet/delta/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from mindspore import nn
import mindspore.common.dtype as mstype
from mindspore.nn.layer.activation import get_activation, _activation
from mindspore.ops import operations as P
from mindspore.ops import functional as F
try:
Expand All @@ -17,6 +16,7 @@
from mindformers.modules.layers import Linear, _args_type_validator_check, _valid_value_checks
_Linear = Linear
from mindpet.delta.delta_constants import VALID_TENSOR_DATATYPE
from mindpet.utils.version_control import get_activation, _activation


class AdapterLayer(nn.Cell):
Expand Down
3 changes: 1 addition & 2 deletions mindpet/delta/low_rank_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from mindspore.common.initializer import initializer, Initializer
from mindspore.common.parameter import Parameter
from mindspore import Tensor
from mindspore.nn.layer.activation import get_activation, _activation
from mindspore.ops import operations as P
from mindspore.ops import functional as F
try:
Expand All @@ -17,7 +16,7 @@
import mindspore._checkparam as Validator
from mindformers.modules.layers import _args_type_validator_check, _valid_value_checks
from mindpet.delta.delta_constants import VALID_TENSOR_DATATYPE

from mindpet.utils.version_control import get_activation, _activation

class LowRankLinear(nn.Cell):
"""
Expand Down
4 changes: 4 additions & 0 deletions mindpet/layers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright © Huawei Technologies Co., Ltd. 2022-2023. All rights reserved.
"""layers init"""
Loading

0 comments on commit 15036e5

Please sign in to comment.