小编use*_*241的帖子

使用Sagemaker将数据上传到S3

尝试将数据上传到S3存储桶时,SageMaker出现问题。我收到此错误:


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
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 …
Run Code Online (Sandbox Code Playgroud)

amazon-s3 amazon-sagemaker

2
推荐指数
1
解决办法
2579
查看次数

如何将科学转换为十进制表示法?

我有一个关于将$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)

perl scientific-notation

1
推荐指数
1
解决办法
3569
查看次数