nice to meet you. I am an amateur, but I changed your code a little so that it can be applied to each layer. Also, now uses MPS when available on Apple silicon. It works on M1macbook pro, but I'm sorry if it doesn't work on other environments.
As a side note, the code was very easy to read.
nice to meet you. I am an amateur, but I changed your code a little so that it can be applied to each layer. Also, now uses MPS when available on Apple silicon. It works on M1macbook pro, but I'm sorry if it doesn't work on other environments. As a side note, the code was very easy to read.
初めまして。私は素人ですがあなたのコードを少し変えて各階層ごとに適応できるようにしました。また、Appleシリコン上でmpsが使える際にそれを使うようにしました。M1macbook proでは動作していますが他の環境で動作しなければ申し訳ないです。 余談ですが、とても読みやすいコードで助かりました。