We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Apparently creating new tensors via torch.tensor() creates lots of overheads (as Kien pointed out). See here for details.
def pad(a, value, l): a.extend([value] * l) return a batch_team_fleet_pos_x = [[pos_x for pos_x, pos_y in x["team_fleet_pos"]] for x in batch] batch_team_fleet_pos_x = [pad(a, 21, max_team_fleet_len-len(a)) for a in batch_team_fleet_pos_x] batch_team_fleet_pos_x = torch.tensor(batch_team_fleet_pos_x).long()
Possible solution.
The text was updated successfully, but these errors were encountered:
Not relevant anymore :D
Sorry, something went wrong.
No branches or pull requests
Apparently creating new tensors via torch.tensor() creates lots of overheads (as Kien pointed out). See here for details.
Possible solution.
The text was updated successfully, but these errors were encountered: