seujung commented on a change in pull request #13735: update wavenet codes URL: https://github.com/apache/incubator-mxnet/pull/13735#discussion_r252286024
########## File path: example/gluon/wavenet/trainer.py ########## @@ -0,0 +1,130 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +""" +Module: WaveNet trainer modulep +""" +import sys +import numpy as np +import mxnet as mx +from mxnet import gluon, autograd, nd +from tqdm import trange + +from models import WaveNet +from utils import decode_mu_law +from data_loader import load_wav, data_generation, data_generation_sample +# pylint: disable=invalid-name, too-many-arguments, too-many-instance-attributes, no-member, no-self-use +# set gpu count +def setting_ctx(use_gpu): + """ + Description : setting cpu/gpu + """ + if eval(use_gpu): Review comment: delete eval and change the use_gpu mode ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
