I created a separate notebook in the same repo with models.py (imported) and the rest of AttnGAN project. My notebook is similar to pretrain_DAMSM.py but modified so I can import the model into production. I also switched to .export and got the same results. I’ll post the code on my git repo but you need to download the coco data just fyi. I didn’t push commit the attngan project by the way

  
      github.com
  
  
    rchavezj/ConvertML_Models/blob/master/convert_.ipynb 4
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from __future__ import print_function\n",
    "\n",
    "from miscc.utils import mkdir_p\n",
    "from miscc.utils import build_super_images\n",
    "from miscc.losses import sent_loss, words_loss\n",
    "from miscc.config import cfg, cfg_from_file\n",
    "\n",
    "from datasets import TextDataset\n",
    "from datasets import prepare_data\n",
    "\n",


  This file has been truncated. show original