Skip to content

Commit

Permalink
Merge pull request #48 from denadai2/master
Browse files Browse the repository at this point in the history
Bugfixes on training step
  • Loading branch information
richzhang authored Sep 17, 2020
2 parents 9cff7b4 + 68cb7e4 commit 6775bdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lpips/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from tqdm import tqdm
from IPython import embed
import lpips
import os


class Trainer():
def name(self):
Expand Down Expand Up @@ -63,7 +65,7 @@ def initialize(self, model='lpips', net='alex', colorspace='Lab', pnet_rand=Fals

if self.is_train: # training mode
# extra network on top to go from distances (d0,d1) => predicted human judgment (h*)
self.rankLoss = networks.BCERankingLoss()
self.rankLoss = lpips.BCERankingLoss()
self.parameters += list(self.rankLoss.net.parameters())
self.lr = lr
self.old_lr = lr
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ scikit-image>=0.13.0
opencv>=2.4.11
matplotlib>=1.5.1
tqdm>=4.28.1
jupyter

0 comments on commit 6775bdf

Please sign in to comment.