mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Implement Variable.new (#4080)
This commit is contained in:
@ -113,7 +113,10 @@ def create_python_bindings(
|
||||
typename = 'Tensor'
|
||||
|
||||
unpack = unpack_methods.get(typename, typename.lower())
|
||||
actuals.append('r.{}({})'.format(unpack, arg_idx))
|
||||
expr = 'r.{}({})'.format(unpack, arg_idx)
|
||||
if typename == 'Storage &':
|
||||
expr = '*' + expr
|
||||
actuals.append(expr)
|
||||
dispatch_type = typename
|
||||
if dispatch_type == 'Tensor':
|
||||
dispatch_type = 'const Tensor &'
|
||||
|
Reference in New Issue
Block a user