Google Colaboratoryで動いたJupyter上のTensorflow/KerasコードがAWS SageMakerで動かない
Google Colaboratoryで動いていたJupyter NotebookのコードをAWS Sagemakerのノートブックインスタンスで動かしてみたところ、`Shape must be at least rank 3 but is rank 2 for '{{node BiasAdd}} = BiasAdd[T=DT_FLOAT, data_format="NCHW"](add, bias)' with input shapes: [?,128], [128].`のエラーが出て動作しませんでした。 原因を調べて対処方法をまとめましたので記録しておきます。