尝试将数据上传到S3存储桶时,SageMaker出现问题。我收到此错误:
Run Code Online (Sandbox Code Playgroud)NameError Traceback (most recent call last) <ipython-input-26-d21b1cb0fcab> in <module>() 19 download('http://data.mxnet.io/data/caltech-256/caltech-256-60-train.rec') 20 ---> 21 upload_to_s3('train', 'caltech-256-60-train.rec') <ipython-input-26-d21b1cb0fcab> in upload_to_s3(channel, file) 13 data = open(file, "rb") 14 key = channel + '/' + file ---> 15 s3.Bucket(bucket).put_object(Key=key, Body=data) 16 17 NameError: name 'bucket' is not defined
这是脚本:
NameError Traceback (most recent call last)
<ipython-input-26-d21b1cb0fcab> in <module>()
19 download('http://data.mxnet.io/data/caltech-256/caltech-256-60-train.rec')
20
---> 21 upload_to_s3('train', 'caltech-256-60-train.rec')
<ipython-input-26-d21b1cb0fcab> in upload_to_s3(channel, file)
13 data = open(file, "rb")
14 key = channel + '/' + file …Run Code Online (Sandbox Code Playgroud) 我有一个关于将$calc值从科学记数法转换为十进制的问题.有什么好主意吗?
my $calc = log2($prob/$probWords);
push @result, join(' ',@words) ." (".$calc.")\n";
if(scalar(@result) == $bloc)
{
$cmp += $bloc;
print "$cmp lignes traités\n";
writeToResultFile($outFile,@result);
@result = ();
}
Run Code Online (Sandbox Code Playgroud)