With sincere guidance from Arjun Gopalan from the Neural Structured Learning team, we just published a tutorial on using structural similarity to regularize the training of deep neural networks for image data:

  

      github.com
  

  
    tensorflow/neural-structured-learning/blob/master/neural_structured_learning/examples/notebooks/graph_keras_cnn_flowers.ipynb 3


    {
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "graph_keras_cnn_flowers",
      "provenance": [],
      "collapsed_sections": [],
      "machine_shape": "hm",
      "authorship_tag": "ABX9TyNkVcRU7nIDq/gDufB88GpW"
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU"
  },



  This file has been truncated. show original

  

  
    
    
  

  


Under the hood, we represent the images of a given dataset as a synthesized graph wherein the nodes are the neighbors for a given image and the edges denote their similarity.
Works with Keras and introduces minimal technical overhead.