diff --git a/ms_adapter/pytorch/nn/modules/container.py b/ms_adapter/pytorch/nn/modules/container.py index c9fa2bbd..cb44b288 100644 --- a/ms_adapter/pytorch/nn/modules/container.py +++ b/ms_adapter/pytorch/nn/modules/container.py @@ -3,6 +3,7 @@ from abc import abstractmethod from collections import OrderedDict, abc as container_abcs from mindspore.nn.layer.container import _get_prefix_and_index, _valid_index, _valid_cell +from ms_adapter.pytorch.tensor import cast_to_adapter_tensor from .module import Module @@ -189,7 +190,7 @@ class Sequential(Module): def forward(self, input): for cell in self.cell_list: input = cell(input) - return input + return cast_to_adapter_tensor(input) class _ModuleListBase: """ diff --git a/setup.py b/setup.py index 2dacdc4f..b60c3b3d 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def req_file(filename, folder=''): return [x.strip() for x in content] setup( - name="MSAdapter", + name="ms_adapter", version='.'.join(map(str, VERSION[:3])) + ''.join(VERSION[3:]), author="Peng Cheng Lab, HUAWEI", author_email="pcl.openi@pcl.ac.cn",