!14910 Removing redundant code from minddata

From: @ezphlow
Reviewed-by: @pandoublefeng,@robingrosman
Signed-off-by: @pandoublefeng
This commit is contained in:
mindspore-ci-bot 2021-04-13 21:02:34 +08:00 committed by Gitee
commit 168cd081d7
3 changed files with 0 additions and 5 deletions

View File

@ -1300,8 +1300,6 @@ class Dataset:
file_type (str, optional): Dataset format (default='mindrecord').
"""
# todo(CRC) warning("Used shuffle, repeat, batch before save operator.")
ir_tree, api_tree = self.create_ir_tree()
runtime_context = cde.PythonRuntimeContext()

View File

@ -53,7 +53,6 @@ int main(int argc, char **argv) {
uint64_t i = 0;
while (row.size() != 0) {
i++;
// auto image = row["image"];
iter->GetNextRow(&row);
}

View File

@ -233,9 +233,7 @@ class CNNDirectionModel(nn.Cell):
# 5 previous layers have mp=2. Height and width of the image would become 1/32.
self.avg_pool = nn.AvgPool2d(kernel_size=(int(self.image_h / 32), int(self.image_w / 32)))
# sqrt(6 / (fan_in + fan_out))
scale = math.sqrt(6 / (out_channels[-1] + dense_layers[0]))
# weight_init='glorot_uniform'
self.dense1 = nn.Dense(out_channels[-1], dense_layers[0], weight_init=Uniform(scale=scale), activation='relu')
scale = math.sqrt(6 / (dense_layers[0] + dense_layers[1]))