

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Neo のコンパイルエラーをトラブルシューティングする
<a name="neo-troubleshooting-compilation"></a>

このセクションでは、一般的なコンパイルエラーを理解して防止する方法、それらが生成するエラーメッセージ、これらのエラーを解決する方法に関する情報を提供します。

**Topics**
+ [このページの使い方](#neo-troubleshooting-compilation-how-to-use)
+ [フレームワーク関連のエラー](#neo-troubleshooting-compilation-framework-related-errors)
+ [インフラストラクチャ関連エラー](#neo-troubleshooting-compilation-infrastructure-errors)
+ [コンパイルログを確認します。](#neo-troubleshooting-compilation-logs)

## このページの使い方
<a name="neo-troubleshooting-compilation-how-to-use"></a>

次の順番でこれらのセクションを参照して、エラーの解決を試みます。

1. コンパイルジョブの入力が入力要件を満たしていることを確認します。「[SageMaker Neo が想定する入力データの形状](neo-compilation-preparing-model.md#neo-job-compilation-expected-inputs)」を参照してください。

1.  一般的な[フレームワーク固有のエラー](https://docs.aws.amazon.com/sagemaker/latest/dg/neo-troubleshooting-compilation.html#neo-troubleshooting-compilation-framework-related-errors)を確認します。

1.  エラーが[インフラストラクチャに関するエラー](https://docs.aws.amazon.com/sagemaker/latest/dg/neo-troubleshooting-compilation.html#neo-troubleshooting-compilation-infrastructure-errors)かどうかを確認します。

1. [コンパイルログ](https://docs.aws.amazon.com/sagemaker/latest/dg/neo-troubleshooting-compilation.html#neo-troubleshooting-compilation-logs)を確認します。

## フレームワーク関連のエラー
<a name="neo-troubleshooting-compilation-framework-related-errors"></a>

### Keras
<a name="neo-troubleshooting-compilation-framework-related-errors-keras"></a>


| エラー | 解決策 | 
| --- | --- | 
|   `InputConfiguration: No h5 file provided in <model path>`   |   指定した Amazon S3 URI に h5 ファイルがあることを確認します。 *または* [h5 ファイルが正しくフォーマットされている](https://www.tensorflow.org/guide/keras/save_and_serialize#keras_h5_format)ことを確認します。  | 
|   `InputConfiguration: Multiple h5 files provided, <model path>, when only one is allowed`   |  提供しているのは `h5` ファイルが 1 つのみであることを確認します。  | 
|   `ClientError: InputConfiguration: Unable to load provided Keras model. Error: 'sample_weight_mode'`   |  指定した Keras バージョンがサポートされていることを確認します。[クラウドインスタンス](https://docs.aws.amazon.com/sagemaker/latest/dg/neo-supported-cloud.html)と[エッジデバイス](https://docs.aws.amazon.com/sagemaker/latest/dg/neo-supported-devices-edge.html)のサポートされているフレームワークを参照してください。  | 
|   `ClientError: InputConfiguration: Input input has wrong shape in Input Shape dictionary. Input shapes should be provided in NCHW format. `   |   モデルの入力が NCHW 形式に従っていることを確認します。「[SageMaker Neo が想定する入力データの形状](https://docs.aws.amazon.com/sagemaker/latest/dg/neo-job-compilation.html#neo-job-compilation-expected-inputs)」を参照してください。  | 

### MXNet
<a name="neo-troubleshooting-compilation-framework-related-errors-mxnet"></a>


| エラー | 解決策 | 
| --- | --- | 
|   `ClientError: InputConfiguration: Only one parameter file is allowed for MXNet model. Please make sure the framework you select is correct.`   |   SageMaker Neo は、コンパイル用に与えられた 1 つ目のパラメータファイルを選択します。  | 

### TensorFlow
<a name="neo-troubleshooting-compilation-framework-related-errors-tensorflow"></a>


| エラー | 解決策 | 
| --- | --- | 
|   `InputConfiguration: Exactly one .pb file is allowed for TensorFlow models.`   |  .pb ファイルまたは .pbtxt ファイルのいずれか 1 つのみを指定しているか確認します。  | 
|  `InputConfiguration: Exactly one .pb or .pbtxt file is allowed for TensorFlow models.`  |  .pb ファイルまたは .pbtxt ファイルのいずれか 1 つのみを指定しているか確認します。  | 
|   ` ClientError: InputConfiguration: TVM cannot convert <model zoo> model. Please make sure the framework you selected is correct. The following operators are not implemented: {<operator name>} `   |   選択した演算子がサポートされていることを確認します。「[SageMaker Neo によってサポートされているフレームワークと演算子](https://aws.amazon.com/releasenotes/sagemaker-neo-supported-frameworks-and-operators/)」を参照してください。  | 

### PyTorch
<a name="neo-troubleshooting-compilation-framework-related-errors-pytorch"></a>


| エラー | 解決策 | 
| --- | --- | 
|   `InputConfiguration: We are unable to extract DataInputConfig from the model due to input_config_derivation_error. Please override by providing a DataInputConfig during compilation job creation.`  |  次のいずれかを実行します。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/sagemaker/latest/dg/neo-troubleshooting-compilation.html)  | 

## インフラストラクチャ関連エラー
<a name="neo-troubleshooting-compilation-infrastructure-errors"></a>


| エラー | 解決策 | 
| --- | --- | 
|   `ClientError: InputConfiguration: S3 object does not exist. Bucket: <bucket>, Key: <bucket key>`   |  指定した Amazon S3 URI を確認します。  | 
|   ` ClientError: InputConfiguration: Bucket <bucket name> is in region <region name> which is different from AWS Sagemaker service region <service region> `   |   サービスと同じリージョンにある Amazon S3 バケットを作成します。  | 
|   ` ClientError: InputConfiguration: Unable to untar input model. Please confirm the model is a tar.gz file `   |   Amazon S3 にあるモデルが圧縮されて `tar.gz` ファイルになっていることを確認します。  | 

## コンパイルログを確認します。
<a name="neo-troubleshooting-compilation-logs"></a>

1. [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) で Amazon CloudWatch に移動します。

1. 右上の **[リージョン]** ドロップダウンリストから、コンパイルジョブを作成したリージョンを選択します。

1. Amazon CloudWatch のナビゲーションペインで、**[ログ]** を選択します。**[ロググループ]** を選択します。

1. `/aws/sagemaker/CompilationJobs` という名前のロググループを検索します。ロググループを選択します。

1. コンパイルジョブ名にちなんだ名前のログストリームを検索します。ログストリームを選択します。