2018-01-08から1日間の記事一覧
Kerasと違ってPyTorchで自前のロス関数を定義するのは大変かなと思ったのですが、Kerasとほぼ同じやり方で出来ました。 #1. ロス関数を定義して def dice_coef_loss(input, target): small_value = 1e-4 input_flattened = input.view(-1) target_flattened …
Kerasと違ってPyTorchで自前のロス関数を定義するのは大変かなと思ったのですが、Kerasとほぼ同じやり方で出来ました。 #1. ロス関数を定義して def dice_coef_loss(input, target): small_value = 1e-4 input_flattened = input.view(-1) target_flattened …