mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[torch] DRY a couple of lines in unpickler (#163447)
Test Plan: CI. Reviewed By: dolpm Differential Revision: D82660989 Pull Request resolved: https://github.com/pytorch/pytorch/pull/163447 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
4d3d32f14c
commit
8b14f43da9
@ -262,10 +262,8 @@ void Unpickler::setInput(size_t memo_id) {
|
||||
AT_ASSERT(!stack_.empty());
|
||||
if (memo_id >= memo_table_.size()) {
|
||||
memo_table_.resize(memo_id + 1);
|
||||
memo_table_[memo_id] = stack_.back();
|
||||
} else {
|
||||
memo_table_[memo_id] = stack_.back();
|
||||
}
|
||||
memo_table_[memo_id] = stack_.back();
|
||||
}
|
||||
|
||||
static std::vector<int64_t> tupleToIntList(const IValue& v) {
|
||||
|
Reference in New Issue
Block a user