Skip to content

Commit

Permalink
- fixed indep dep learning
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmic committed Aug 20, 2019
1 parent 5a583b5 commit f96c9d0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mini_imagenet_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,16 +302,18 @@ def generate_add_samples(self, phase = 'train'):
# care must be taken, that with a different dataset the labels have a different meaning. Thus if we use a new dataset, we must
# use network_base which fits to the database. Therefore there must be taken images with label from the same dataset.
network_base_img = batch_train_img[:train_epoch_size]
network_base_img = batch_train_label[:train_epoch_size]
#only half is used now, as the rest is reserved for independend base
network_base_label = batch_train_label[:train_epoch_size]

#only half is used now, as the rest is reserved for independend base
episode_train_img = batch_train_img[train_epoch_size:]
episode_train_label = batch_train_label[train_epoch_size:]

if not args.use_independent_base:
network_base_img = episode_train_img
network_base_label = episode_train_label
if args.train_indep_and_dependent:
if args.train_indep_and_dependent: #train_epoch_size wrong, before should be old ....
network_base_img = batch_train_img[:int(train_epoch_size/2)]
network_base_label = batch_train_label[:int(train_epoch_size/2)]
episode_train_img = batch_train_img
episode_train_label = batch_train_label
if phase == 'train':
Expand Down

0 comments on commit f96c9d0

Please sign in to comment.