第2章準備
2.1.8. Exercises2.1.8 練習問題
- Run the code in this section. Change the conditional statement
X == YtoX < YorX > Y, and then see what kind of tensor you can get.英語のヒント
この節のコードを実行せよ。条件文X == YをX < YやX > Yに変えて、どんなテンソルが得られるかを見よ。 - Replace the two tensors that operate by element in the broadcasting mechanism with other shapes, e.g., 3-dimensional tensors. Is the result the same as expected?
英語のヒント
ブロードキャストの仕組みで要素ごとに演算する二つのテンソルを、ほかの形状、たとえば3次元のテンソルに置き換えよ。結果は予想どおりか。