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
torch的cat,单输入,会创建另外一个单输出
>>> import torch >>> torch.__version__ '1.10.0' >>> x = torch.randn(2, 5, 5) >>> y = torch.cat([x], 0) >>> id(x) 140275845558832 >>> id(y) 140273210832272 # not x
oneflow的cat,单输入,输出直接返回了原输入
>>> import oneflow as torch >>> x = torch.randn(2, 5, 5) >>> y = torch.cat([x], 0) >>> id(x) 140275721802288 >>> id(y) 140275721802288 # is x
class ConcatFunctor { public: ConcatFunctor() { ops_.resize(kMaxInputCount); for (int n = 1; n < ops_.size(); ++n) { ops_[n] = CHECK_JUST(one::OpBuilder("concat").Input("in", n + 1).Output("out").Build()); } } Maybe<Tensor> operator()(const TensorTuple& inputs, const int64_t& dim) const { if (inputs.size() == 1) { return inputs.at(0); } # 问题所在
The text was updated successfully, but these errors were encountered:
Check the torch in few second on click event can be use
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Summary
torch的cat,单输入,会创建另外一个单输出
oneflow的cat,单输入,输出直接返回了原输入
问题代码
The text was updated successfully, but these errors were encountered: