prompt
stringlengths
94
42.6k
completion
stringlengths
6
120
api
stringlengths
14
68
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.log(gt_height / bbox_height)
megengine.functional.log
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.stack([target_dx, target_dy, target_dw, target_dh], axis=1)
megengine.functional.stack
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(inter / union, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(inter / union, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(inter / b_area_box, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(inter / union, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.equal(gt[:, 4], ignore_label)
megengine.functional.equal
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(ignore_mask, 0)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.exp(dw)
megengine.functional.exp
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.exp(dh)
megengine.functional.exp
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(box, 1)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(gt, 0)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.minimum(b_box[:, :, 2], b_gt[:, :, 2])
megengine.functional.minimum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.minimum(b_box[:, :, 3], b_gt[:, :, 3])
megengine.functional.minimum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(iw, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(ih, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(box[:, 2] - box[:, 0], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(box[:, 3] - box[:, 1], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(gt[:, 2] - gt[:, 0], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(gt[:, 3] - gt[:, 1], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(area_box, 1)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(area_gt, 0)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(box, 1)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(gt, 0)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.minimum(b_box[:, :, 2], b_gt[:, :, 2])
megengine.functional.minimum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.minimum(b_box[:, :, 3], b_gt[:, :, 3])
megengine.functional.minimum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(iw, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(ih, 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(box[:, 2] - box[:, 0], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(box[:, 3] - box[:, 1], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(gt[:, 2] - gt[:, 0], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.maximum(gt[:, 3] - gt[:, 1], 0)
megengine.functional.maximum
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(area_gt, 0)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(area_box, 1)
megengine.functional.expand_dims
import math import megengine as mge import megengine.functional as F import numpy as np from megengine import Tensor import pdb def restore_bbox(rois, deltas, unnormalize=True, config = None): assert deltas.ndim == 3 if unnormalize: std_opr = mge.tensor(config.bbox_normalize_stds.reshape(1, 1, -1)) ...
F.expand_dims(rois, 1)
megengine.functional.expand_dims
# 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 ...
sqrt(bn_var + eps)
megengine.functional.sqrt
# 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 ...
Tensor(opr.weight)
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 ...
Tensor(opr.inp_tensors[1].np_data)
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 ...
Tensor(opr.bias)
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 ...
Tensor(opr.inp_tensors[2].np_data)
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 ...
Tensor(opr.mean)
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 ...
Tensor(opr.inp_tensors[3].np_data)
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 ...
Tensor(opr.var)
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 ...
Tensor(opr.inp_tensors[4].np_data)
megengine.Tensor
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.ones((1, 3, 3, 3))
megengine.functional.ones
# 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 ARRANTIES OR CONDITIONS OF ANY ...
trace_module(module, x)
megengine.traced_module.trace_module
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.copy(x)
megengine.functional.copy
# 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 ARRANTIES OR CONDITIONS OF ANY ...
Node._set_next_id(159)
megengine.traced_module.node.Node._set_next_id
# 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 ARRANTIES OR CONDITIONS OF ANY ...
Expr._set_next_id(1024)
megengine.traced_module.expr.Expr._set_next_id
# 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 ARRANTIES OR CONDITIONS OF ANY ...
trace_module(module, x)
megengine.traced_module.trace_module
# 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 ARRANTIES OR CONDITIONS OF ANY ...
trace_module(module, x)
megengine.traced_module.trace_module
# 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 ARRANTIES OR CONDITIONS OF ANY ...
M.Conv2d(in_channels, channels, 3, 1, padding=1, bias=False)
megengine.module.Conv2d
# 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 ARRANTIES OR CONDITIONS OF ANY ...
M.BatchNorm2d(channels)
megengine.module.BatchNorm2d
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.concat([a, a])
megengine.functional.concat
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.neg(relu_out)
megengine.functional.neg
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.zeros((1,))
megengine.functional.zeros
# 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 ARRANTIES OR CONDITIONS OF ANY ...
qat.Concat()
megengine.module.qat.Concat
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.concat([expect, expect, expect])
megengine.functional.concat
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.relu(x)
megengine.functional.relu
# 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 ARRANTIES OR CONDITIONS OF ANY ...
M.Identity()
megengine.module.Identity
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.zeros((1,))
megengine.functional.zeros
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.neg(relu_out)
megengine.functional.neg
# 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 ARRANTIES OR CONDITIONS OF ANY ...
M.Identity()
megengine.module.Identity
# 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 ARRANTIES OR CONDITIONS OF ANY ...
M.Identity()
megengine.module.Identity
# 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 ARRANTIES OR CONDITIONS OF ANY ...
M.Identity()
megengine.module.Identity
# 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 ARRANTIES OR CONDITIONS OF ANY ...
M.Identity()
megengine.module.Identity
# 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 ARRANTIES OR CONDITIONS OF ANY ...
F.neg(x)
megengine.functional.neg
# -*- coding: utf-8 -*- # 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 ARRANTI...
Elemwise(mode)
megengine.core.ops.builtin.Elemwise
# -*- coding: utf-8 -*- # 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 ARRANTI...
dist.Server(port)
megengine.distributed.Server
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper([0.0])
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(y_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(dz_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(dz_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
Elemwise(Elemwise.Mode.RELU)
megengine.core.ops.builtin.Elemwise
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorAttr()
megengine.core._imperative_rt.TensorAttr
# -*- coding: utf-8 -*- # 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 ARRANTI...
imperative.make_backward_graph(op, [attr], [True], [True])
megengine.core._imperative_rt.imperative.make_backward_graph
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
F.broadcast_to(x, (3, 3, 10))
megengine.functional.broadcast_to
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
TensorWrapper(x_np)
megengine.core.tensor.tensor_wrapper.TensorWrapper
# -*- coding: utf-8 -*- # 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 ARRANTI...
apply(op, *args)
megengine.core.tensor.tensor.apply
# -*- coding: utf-8 -*- # 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 ARRANTI...
dist.get_free_ports(1)
megengine.distributed.get_free_ports
# -*- coding: utf-8 -*- # 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 ARRANTI...
dist.init_process_group("localhost", port, world_size, 0, 0)
megengine.distributed.init_process_group
# -*- coding: utf-8 -*- # 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 ARRANTI...
mge.device.set_default_device("gpu0")
megengine.device.set_default_device
# -*- coding: utf-8 -*- # 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 ARRANTI...
Grad()
megengine.core.autodiff.grad.Grad
# -*- coding: utf-8 -*- # 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 ARRANTI...
remote_send(x, 1)
megengine.functional.distributed.remote_send
# -*- coding: utf-8 -*- # 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 ARRANTI...
remote_recv(1, x_np.shape, x_np.dtype, "gpu0")
megengine.functional.distributed.remote_recv
# -*- coding: utf-8 -*- # 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 ARRANTI...
dist.init_process_group("localhost", port, world_size, 1, 1)
megengine.distributed.init_process_group
# -*- coding: utf-8 -*- # 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 ARRANTI...
mge.device.set_default_device("gpu1")
megengine.device.set_default_device
# -*- coding: utf-8 -*- # 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 ARRANTI...
Grad()
megengine.core.autodiff.grad.Grad
# -*- coding: utf-8 -*- # 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 ARRANTI...
remote_recv(0, x_np.shape, x_np.dtype, "gpu1")
megengine.functional.distributed.remote_recv
# -*- coding: utf-8 -*- # 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 ARRANTI...
remote_send(recv_x, 0)
megengine.functional.distributed.remote_send