#pragma once | |
#include <torch/torch.h> | |
const auto list_construct_script = R"JIT( | |
def forward(self, a, b): | |
return [a, b] | |
)JIT"; | |
const auto list_unpack_script = R"JIT( | |
def forward(self, a, b): | |
c = [a, b] | |
x, y = c | |
z = x + y | |
return z | |
)JIT"; | |
const auto tuple_construct_script = R"JIT( | |
def forward(self, a, b): | |
return (a, b) | |
)JIT"; | |
const auto add_script = R"JIT( | |
def forward(self, a, b): | |
return a + b | |
)JIT"; |