tensorflow / tensor2tensor

Library of deep learning models and datasets designed to make deep learning more accessible and accelerate ML research.
Apache License 2.0
15.5k stars 3.49k forks source link

How to run run text to image on MS-COCO database #1164

Open MoslemTCM opened 6 years ago

MoslemTCM commented 6 years ago

Description

Hi, i am trying to run the Image2Text problem (image_text_ms_coco) using Tensor2Tensor on MS-COCO database. But I'm not sure what set of parameter (problem, model and hparams) should i use ? Should i change these settings if i want to test the opposite problem text2image (image_text_ms_coco_rev).

Environment information

OS: Ubuntu 16.04

$ pip freeze | grep tensor
tensor2tensor==1.8.0
tensorboard==1.10.0
tensorflow-gpu==1.10.0

$ python -V
Python 3.5.2

For bugs: reproduction and error logs

# Steps to reproduce:
HPARAMS=imagetransformer2d_base
PROBLEM=image_text_ms_coco
MODEL=imagetransformer2d
DATA_DIR=/opt/T2T_Image_Caption/t2t_data/
TRAIN_DIR=/opt/T2T_Image_Caption/t2t_train/image_text_ms_coco/

t2t-trainer \
  --data_dir=$DATA_DIR \
  --output_dir=$TRAIN_DIR \
  --train_steps=4000000 \
  --model=$MODEL \
  --hparams_set=$HPARAMS \
  --problem=$PROBLEM
# Error logs:
ValueError: Dimension size must be evenly divisible by 3 but is 1
    Number of ways to split should evenly divide the split dimension for 'imagetransformer2d/parallel_0_4/imagetransformer2d/imagetransformer2d/body/split' (op: 'Split') with input shapes: [], [?,?,1,1] and with computed input tensors: input[0] = <3>.
ZainySong commented 5 years ago

So sorry to bother you. I met the same problem as you. Have you solved this problem?

MoslemTCM commented 5 years ago

@ZainySong , sorry but i am still looking for a solution.

deeptimhe commented 5 years ago

@MoslemTCM @ZainySong I am working on this too. Have you solved this?