Kerasで行列の形を変換する方法を教えてもらえませんか?

Kerasで行列の形を変換する方法を教えてもらえませんか? shape=(None, 168, 64)の行列をshape=(None, 64, 168)にしたいと思っています.
Kerasで行列の形状を変換 ...
[Keras tuner] hp.Intとhp.Choiceの違いは?

Keras Tunerでは、hp.Intとhp.Choiceの2つの異なるタイプのハイパーパラメータを定義することができます。
hp.Intは整数値を取るハイパーパラメータを定義するために使用されます。このタイプのハイパー ...
Keras tunerの使い方

Keras Tunerは、TensorFlowのモデルハイパーパラメータの最適化ライブラリです。以下は、Keras Tunerを使用してモデルを構築し、ハイパーパラメータの最適化を行う一般的な手順です。
ライブラリをインストール ...StyleGANをKerasで実装する方法

StyleGANは、TensorFlowで実装されており、Kerasでの実装は公式に提供されていません。しかし、TensorFlow Keras APIを使用してStyleGANを実装することができます。以下は、StyleGANの実装 ...
tf.GradientTape()は何のための関数?

tf.GradientTape()はTensorFlowのオートグラフ機能の一つで、任意の計算を記録してその計算に関する勾配を計算するために使用される関数です。
TensorFlowでは、計算グラフを構築して計算を実行する ...
keras min TypeError: Value passed to parameter ‘reduction_indices’ has DataType float32 not in list of allowed values: int32, int64

このエラーが出た時は関数の使い方を疑う.例えば,K.min()とするところをK.min(a,b)としていないかなど.また,キャストを行うことも対策として挙げられる.
step = K.cast(step, dtype="floa ...EpochではなくStepごとに学習率制御[Keras]

Transformerで適用されている下式のウォームアップを実装する方法を紹介
tf.kerasでは学習率の制御にはtf.keras.callbacks.LearningRateSchedulerを使ってEpoch単位で変 ...
AttributeError: ‘NoneType’ object has no attribute ‘dtype’

このエラーは、定義したモデル関数が何も返さない場合に起こることがある。返り値を忘れていないか、返り値の損失がないか、などを確認すると良い。
[Keras] Inputのshapeとbatch_shapeの違いは?

keras.Inputを用いる際、
inputs = Input(shape(in_shape, in_dim))
と
inputs = Input(batch_shape(batch_size, ...
Kerasで花画像の名前を当てる~検出編~[Keras][CNN][深層学習][Python]

vastee.hatenablog.com
の続き
今回は学習したモデルを使って花の名前を当てるプログラムを作成する.
import numpy as npfrom keras.preprocessing ...