forked from OSSInnovation/mindspore
!2522 modify alexnet dataset.py
Merge pull request !2522 from wukesong/wks-r0.5
This commit is contained in:
commit
9b65782e1b
|
@ -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"):
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue