This commit is contained in:
wukesong 2020-06-23 22:14:38 +08:00
parent ab83bf18d9
commit 16544b37d6
2 changed files with 3 additions and 2 deletions

View File

@ -16,11 +16,11 @@
Produce the dataset Produce the dataset
""" """
from config import alexnet_cfg as cfg
import mindspore.dataset as ds import mindspore.dataset as ds
import mindspore.dataset.transforms.c_transforms as C import mindspore.dataset.transforms.c_transforms as C
import mindspore.dataset.transforms.vision.c_transforms as CV import mindspore.dataset.transforms.vision.c_transforms as CV
from mindspore.common import dtype as mstype from mindspore.common import dtype as mstype
from .config import alexnet_cfg as cfg
def create_dataset_mnist(data_path, batch_size=32, repeat_size=1, status="train"): def create_dataset_mnist(data_path, batch_size=32, repeat_size=1, status="train"):

View File

@ -43,11 +43,12 @@ class LeNet5(nn.Cell):
Args: Args:
num_class (int): Num classes. Default: 10. num_class (int): Num classes. Default: 10.
channel (int): Num channels. Default: 1.
Returns: Returns:
Tensor, output tensor Tensor, output tensor
Examples: Examples:
>>> LeNet(num_class=10) >>> LeNet(num_class=10, channel=1)
""" """
def __init__(self, num_class=10, channel=1): def __init__(self, num_class=10, channel=1):