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-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.arange(1, logits.shape[2] + 1) | megengine.functional.arange |
# -*- 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.add_axis(labels, axis=2) | megengine.functional.add_axis |
# -*- 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.sigmoid(logits) | megengine.functional.sigmoid |
# -*- 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.abs(x) | megengine.functional.abs |
# -*- 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.exp(scores) | megengine.functional.exp |
#!/usr/bin/env python3
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
import megengine as mge
import megengine.module as M
import numpy as np
import pytest
from basecls.models.repvgg import RepVGGBlock
@pytest.mark.parametrize("w_in", [32, 64])
@pytest.mark.parametrize("w_out", [64])
@pytest.mark.paramet... | mge.random.uniform(size=(2, w_in, 8, 8)) | megengine.random.uniform |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | M.Linear(input_size, 3 * hidden_size, bias=bias) | megengine.module.Linear |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | M.Linear(hidden_size, 3 * hidden_size, bias=bias) | megengine.module.Linear |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.reshape(x, (-1, x.shape[1])) | megengine.functional.reshape |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.split(gate_x, 3, axis=1) | megengine.functional.split |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.split(gate_h, 3, axis=1) | megengine.functional.split |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.sigmoid(i_r + h_r) | megengine.functional.sigmoid |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.sigmoid(i_i + h_i) | megengine.functional.sigmoid |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | M.Linear(input_size, 4 * hidden_size, bias=bias) | megengine.module.Linear |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | M.Linear(hidden_size, 4 * hidden_size, bias=bias) | megengine.module.Linear |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.reshape(x, (-1, x.shape[1])) | megengine.functional.reshape |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.split(gates, 4, axis=1) | megengine.functional.split |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.sigmoid(ingate) | megengine.functional.sigmoid |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.sigmoid(forgetgate) | megengine.functional.sigmoid |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.tanh(cellgate) | megengine.functional.tanh |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.sigmoid(outgate) | megengine.functional.sigmoid |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | M.init.uniform_(w, -std, std) | megengine.module.init.uniform_ |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.zeros((self.num_layers, batch, self.hidden_size)) | megengine.functional.zeros |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.stack(outs, axis=1) | megengine.functional.stack |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.stack(outs, axis=0) | megengine.functional.stack |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | M.init.uniform_(w, -std, std) | megengine.module.init.uniform_ |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.mul(cx, forgetgate) | megengine.functional.mul |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.mul(ingate, cellgate) | megengine.functional.mul |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.tanh(cy) | megengine.functional.tanh |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.zeros((self.num_layers, batch, self.hidden_size)) | megengine.functional.zeros |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.zeros((self.num_layers, batch, self.hidden_size)) | megengine.functional.zeros |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.stack(outs, axis=1) | megengine.functional.stack |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.stack(outs, axis=0) | megengine.functional.stack |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.dropout(hidden_l, self.dropout) | megengine.functional.dropout |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.dropout(hidden_l[0], self.dropout) | megengine.functional.dropout |
import math
import numpy as np
import megengine as mge
import megengine.functional as F
import megengine.module as M
# ================================= GRU Implementation ==========================================================
class GRUCell(M.Module):
"""
An implementation of GRUCell.
"""
de... | F.dropout(hidden_l[1], self.dropout) | megengine.functional.dropout |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = | M.Conv2d(input_dim, hidden_dim, 3, padding=1) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = | M.Conv2d(hidden_dim, 2, 3, padding=1) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.ReLU() | megengine.module.ReLU |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | F.concat([h, x], axis=1) | megengine.functional.concat |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | F.concat([h, x], axis=1) | megengine.functional.concat |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.Conv2d(cor_planes, 256, 1, padding=0) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.Conv2d(256, 192, 3, padding=1) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.Conv2d(2, 128, 7, padding=3) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.Conv2d(128, 64, 3, padding=1) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.Conv2d(64 + 192, 128 - 2, 3, padding=1) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | F.concat([cor, flo], axis=1) | megengine.functional.concat |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | F.concat([out, flow], axis=1) | megengine.functional.concat |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | F.concat([inp, motion_features], axis=1) | megengine.functional.concat |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.Conv2d(128, 256, 3, padding=1) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.ReLU() | megengine.module.ReLU |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | M.Conv2d(256, mask_size**2 * 9, 1, padding=0) | megengine.module.Conv2d |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | F.concat([r * h, x], axis=1) | megengine.functional.concat |
import megengine.module as M
import megengine.functional as F
class FlowHead(M.Module):
def __init__(self, input_dim=128, hidden_dim=256):
super(FlowHead, self).__init__()
self.conv1 = M.Conv2d(input_dim, hidden_dim, 3, padding=1)
self.conv2 = M.Conv2d(hidden_dim, 2, 3, padding=1)
... | F.concat([r * h, x], axis=1) | megengine.functional.concat |
#!/usr/bin/env python3
from dataset import SIDDValData
from model import UNetD
import megengine.data as data
from utils import batch_PSNR
from tqdm import tqdm
import argparse
import pickle
import megengine
def test(args):
valid_dataset = SIDDValData(args.data)
valid_sampler = data.SequentialSampler(
... | megengine.tensor(image) | megengine.tensor |
#!/usr/bin/env python3
from dataset import SIDDValData
from model import UNetD
import megengine.data as data
from utils import batch_PSNR
from tqdm import tqdm
import argparse
import pickle
import megengine
def test(args):
valid_dataset = SIDDValData(args.data)
valid_sampler = data.SequentialSampler(
... | megengine.tensor(label) | megengine.tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(text_input) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(text_output) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(mel) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(pos_text) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(pos_mel) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(text_length) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(mel_length) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(text_input) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(text_output) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(mel) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(pos_text) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(pos_mel) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(text_length) | megengine.Tensor |
import os
import numpy as np
import collections
import megengine.module as M
import megengine.functional as F
import megengine as mge
from megengine.data.dataset import Dataset
from megengine.data import DataLoader
import hparams as hp
from megengine.data import Collator
class AsrDataset(Dataset):
def __init__(se... | mge.Tensor(mel_length) | megengine.Tensor |
# -*- 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... | megengine.logger.get_logger() | megengine.logger.get_logger |
# -*- 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... | data.dataset.ImageNet(args.data, train=True) | megengine.data.dataset.ImageNet |
# -*- 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... | data.dataset.ImageNet(args.data, train=False) | megengine.data.dataset.ImageNet |
# -*- 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... | dist.Server(port=args.dist_port) | megengine.distributed.Server |
# -*- 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... | DTR(memory_budget=5*1024**3) | megengine.utils.dtr.DTR |
# -*- 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... | F.nn.cross_entropy(logits, label) | megengine.functional.nn.cross_entropy |
# -*- 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... | F.topk_accuracy(logits, label, topk=(1, 5)) | megengine.functional.topk_accuracy |
# -*- 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... | megengine.tensor(image, dtype="float32") | megengine.tensor |
# -*- 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... | megengine.tensor(label, dtype="int32") | megengine.tensor |
# -*- 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... | megengine.tensor(image, dtype="float32") | megengine.tensor |
# -*- 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... | megengine.tensor(label, dtype="int32") | megengine.tensor |
# -*- 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... | data.RandomSampler(train_dataset, batch_size=args.batch_size, drop_last=True) | megengine.data.RandomSampler |
# -*- 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... | dist.get_rank() | megengine.distributed.get_rank |
# -*- 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... | dist.get_world_size() | megengine.distributed.get_world_size |
# -*- 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... | autodiff.GradManager() | megengine.autodiff.GradManager |
# -*- 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... | F.nn.cross_entropy(logits, label) | megengine.functional.nn.cross_entropy |
# -*- 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... | F.topk_accuracy(logits, label, topk=(1, 5)) | megengine.functional.topk_accuracy |
# -*- 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... | dist.make_allreduce_cb("SUM") | megengine.distributed.make_allreduce_cb |
# -*- 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... | F.distributed.all_reduce_sum(loss) | megengine.functional.distributed.all_reduce_sum |
# -*- 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... | F.distributed.all_reduce_sum(acc1) | megengine.functional.distributed.all_reduce_sum |
# -*- 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... | F.distributed.all_reduce_sum(acc5) | megengine.functional.distributed.all_reduce_sum |
# -*- 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... | dist.get_rank() | megengine.distributed.get_rank |
# -*- 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... | dist.get_rank() | megengine.distributed.get_rank |
# -*- 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... | T.Resize(256) | megengine.data.transform.Resize |
# -*- 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... | T.CenterCrop(224) | megengine.data.transform.CenterCrop |
# -*- 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... | T.ToMode("CHW") | megengine.data.transform.ToMode |
# -*- 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... | T.RandomResizedCrop(224) | megengine.data.transform.RandomResizedCrop |
# -*- 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... | T.RandomHorizontalFlip() | megengine.data.transform.RandomHorizontalFlip |
# -*- 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... | T.ToMode("CHW") | megengine.data.transform.ToMode |
# -*- 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... | T.RandomResizedCrop(224) | megengine.data.transform.RandomResizedCrop |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.