prompt stringlengths 94 42.6k | completion stringlengths 6 120 | api stringlengths 14 68 |
|---|---|---|
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | trace(symbolic=symbolic) | megengine.jit.trace |
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | scatter(inp, axis=axis) | megengine.distributed.functional.scatter |
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | trace(symbolic=symbolic) | megengine.jit.trace |
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | gather(inp, axis=concat_axis) | megengine.distributed.functional.gather |
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | gather(all_to_all_output, axis=split_axis) | megengine.distributed.functional.gather |
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | trace(symbolic=symbolic) | megengine.jit.trace |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean((r_gt_euler_deg - r_pred_euler_deg)**2, axis=1) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean((t_gt - t_pred)**2, axis=1) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean(r_mse) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean(t_mse) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean(r_mae) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean(t_mae) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.norm(concatenated[:, :, 3], axis=-1) | megengine.functional.norm |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean(residual_rotdeg) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.mean(residual_transmag) | megengine.functional.mean |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.abs(r_gt_euler_deg - r_pred_euler_deg) | megengine.functional.abs |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.abs(t_gt - t_pred) | megengine.functional.abs |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.concat(total_losses) | megengine.functional.concat |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.nn.l1_loss(pose_pair[1][:, :4], pose_pair[0][:, :4]) | megengine.functional.nn.l1_loss |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.nn.square_loss(pose_pair[1][:, 4:], pose_pair[0][:, 4:]) | megengine.functional.nn.square_loss |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | F.clip(0.5 * (rot_trace - 1), -1.0, 1.0) | megengine.functional.clip |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | mge.tensor([0.7, 0.3]) | megengine.tensor |
import numpy as np
import megengine as mge
import megengine.functional as F
from common import se3, so3
def compute_losses(data_batch, endpoints, params):
loss = {}
# compute losses
if params.loss_type == "omnet":
num_iter = len(endpoints["all_pose_pair"])
for i in range(num_iter):
... | mge.tensor([0.7, 0.3]) | megengine.tensor |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | quantize_qat(net) | megengine.quantization.quantize.quantize_qat |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | dtype.qint8(16.0 / 128.0) | megengine.core.tensor.dtype.qint8 |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | dtype.qint8(16.0 / 128.0) | megengine.core.tensor.dtype.qint8 |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | mge.load("models_fire_det.fix_batch.fuse_scale_cpu.pkl") | megengine.load |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | dtype.qint8(16.0 / 128.0) | megengine.core.tensor.dtype.qint8 |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | mge.load(model) | megengine.load |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | dtype.quint8(16.0 / 128.0, 128) | megengine.core.tensor.dtype.quint8 |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | dtype.get_scale(inp_dtype) | megengine.core.tensor.dtype.get_scale |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | dtype.get_scale(inp_dtype) | megengine.core.tensor.dtype.get_scale |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | dtype.get_zero_point(inp_dtype) | megengine.core.tensor.dtype.get_zero_point |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | M.Elemwise("add") | megengine.module.Elemwise |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | M.Elemwise("add") | megengine.module.Elemwise |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | M.Elemwise("add") | megengine.module.Elemwise |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | QuantStub() | megengine.module.quant_dequant.QuantStub |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | QuantStub() | megengine.module.quant_dequant.QuantStub |
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | mge.tensor(self.data1) | megengine.tensor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.