• Sliced Wasserstein GMM を実装してみた

    最近話題の Sliced Wasserstein Distance (SWD) [Deshpande 2018, Deshpande 2019] を理解するため、 Kolouri らの Sliced Wasserstein Distance for Learning Gaussian Mixture Models (SWGMM) を実装しました。 以前の記事で Wasserstein 距離の解説 を書いたので、こちらも是非ご参照く
  • TensorFlow 2.0 で Variable を ndarray に変換する

    TensorFlow 2.0 の Variable を ndarray に変換するには tensorflow.Variable.numpy() を使います。 import tensorflow x = tensorflow.Variable(tensorflow.random.uniform([4, 4])) print(x) y = x.numpy() print(y) $ # macOS Mojave (10.14) + TensorFlow 2.0.0b1 $ python3 sample.py <tf.Variable 'Variable:0' shape=(4, 4) dtype=float32, numpy= array([[0.4963708 , 0.5265337 , 0.645676 , 0.36317182], [0.88785803, 0.6770747 , 0.34829807, 0.7676312 ], [0.64356697, 0.1472162 , 0.6687521 , 0.6949041 ], [0.9588698 ,
  • lldb で関数の呼び出し履歴を表示する

    lldb で関数の呼び出し履歴(バックトレース)を表示するには、bt コマンドを使います。 #include <stdio.h> void sample1() { printf("sample 1\n"); } void sample2() { sample1(); } void sample3() { sample2(); } int main(void) { sample3(); return 0; } $ # Intel Mac +
  • carthage のバージョンを確認する

    carthage のバージョンを確認するには、carthage version コマンドを使います。 $ # M1 Mac (Ventura) + Carthage 0.39.0 $ carthage version 0.39.0 Tweet 参考資料 Carthage https://github.com/Carthage/Carthage carthage 本体を更新する https://yokaze.github.io/2017/10/23/