python execute用法_Python util.execute方法代码示例

# 需要导入模块: from distutils import util [as 别名]

# 或者: from distutils.util import execute [as 别名]

def make_file(self, infiles, outfile, func, args,

exec_msg=None, skip_msg=None, level=1):

"""Special case of 'execute()' for operations that process one or

more input files and generate one output file. Works just like

'execute()', except the operation is skipped and a different

message printed if 'outfile' already exists and is newer than all

files listed in 'infiles'. If the command defined 'self.force',

and it is true, then the command is unconditionally run -- does no

timestamp checks.

"""

if skip_msg is None:

skip_msg = "skipping %s (inputs unchanged)" % outfile

# Allow 'infiles' to be a single string

if isinstance(infiles, str):

infiles = (infiles,)

elif not isinstance(infiles, (list, tuple)):

raise TypeError, \

"'infiles' must be a string, or a list or tuple of strings"

if exec_msg is None:

exec_msg = "generating %s from %s" % \

(outfile, ', '.join(infiles))

# If 'outfile' must be regenerated (either because it doesn't

# exist, is out-of-date, or the 'force' flag is true) then

# perform the action that presumably regenerates it

if self.force or dep_util.newer_group(infiles, outfile):

self.execute(func, args, exec_msg, level)

# Otherwise, print the "skip" message

else:

log.debug(skip_msg)

# XXX 'install_misc' class not currently used -- it was the base class for

# both 'install_scripts' and 'install_data', but they outgrew it. It might

# still be useful for 'install_headers', though, so I'm keeping it around

# for the time being.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
File "D:\03lyf\代码\seq2point_train.py", line 188, in <module> history = model.fit(train_datagen,epochs=n_epoch, File "D:\py\Anaconda3\envs\代码\lib\site-packages\keras\utils\traceback_utils.py", line 65, in error_handler return fn(*args, **kwargs) File "D:\py\Anaconda3\envs\代码\lib\site-packages\keras\engine\training.py", line 1685, in fit tmp_logs = self.train_function(iterator) File "D:\py\Anaconda3\envs\代码\lib\site-packages\tensorflow\python\util\traceback_utils.py", line 150, in error_handler return fn(*args, **kwargs) File "D:\py\Anaconda3\envs\代码\lib\site-packages\tensorflow\python\eager\polymorphic_function\polymorphic_function.py", line 894, in __call__ result = self._call(*args, **kwds) File "D:\py\Anaconda3\envs\代码\lib\site-packages\tensorflow\python\eager\polymorphic_function\polymorphic_function.py", line 926, in _call return self._no_variable_creation_fn(*args, **kwds) # pylint: disable=not-callable File "D:\py\Anaconda3\envs\代码\lib\site-packages\tensorflow\python\eager\polymorphic_function\tracing_compiler.py", line 143, in __call__ return concrete_function._call_flat( File "D:\py\Anaconda3\envs\代码\lib\site-packages\tensorflow\python\eager\polymorphic_function\monomorphic_function.py", line 1757, in _call_flat return self._build_call_outputs(self._inference_function.call( File "D:\py\Anaconda3\envs\代码\lib\site-packages\tensorflow\python\eager\polymorphic_function\monomorphic_function.py", line 381, in call outputs = execute.execute( File "D:\py\Anaconda3\envs\代码\lib\site-packages\tensorflow\python\eager\execute.py", line 52, in quick_execute tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, KeyboardInterrupt
06-13

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值