Skip to content

darcula1993/Mutual-Channel-Loss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Mutual-Channel-Loss

This is an unofficial implementation of Mutual-Channel-Loss:The Devil is in the Channels: Mutual-Channel Loss for Fine-Grained Image Classification (TIP 2020) DOI

The official pytorch code

Requirements:

  • tensorflow 2.0+
  • numpy

Sample Usage:

model = create_model() #model should have two outputs:[predictions,featuremap]

### "predcitions" and "featuremap" are corresponding ouput layers' names.

losses = {
"predictions": "categorical_crossentropy",
"featuremap": MutualChannelLoss,
}

lossWeights = {"predictions": 1.0, "featuremap": 0.05}

model.compile(
    loss = losses,
    loss_weights = lossWeights,
    optimizer = opt,
    metrics = {'predictions': 'accuracy'}
)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages