Skip to content
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

fix PLE network bug & sort file list for ps trainer #932

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion models/multitask/ple/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def forward(self, input_data):
# task-specific expert part
for i in range(0, self.task_num):
for j in range(0, self.exp_per_task):
linear_out = self._param_expert[i * self.task_num + j](
linear_out = self._param_expert[i * self.exp_per_task + j](
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

正确的

input_data[i])
expert_output = F.relu(linear_out)
expert_outputs.append(expert_output)
Expand Down
2 changes: 1 addition & 1 deletion tools/utils/static_ps/reader_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_infer_reader(input_var, config):

def get_file_list(data_path, config):
assert os.path.exists(data_path)
file_list = [data_path + "/%s" % x for x in os.listdir(data_path)]
file_list = [data_path + "/%s" % x for x in sorted(os.listdir(data_path))]
if config.get("runner.split_file_list"):
logger.info("Split file list for worker {}".format(fleet.worker_index(
)))
Expand Down