Giter VIP home page Giter VIP logo

tf_tutorial_plus's Introduction

TensorFlow Tutorial +

Tutorials for TensorFlow APIs the official documentation doesn't cover

TF Version: 1.1

Contents (To be updated)

RNN and Seq2Seq

  • RNNCell and its variants
  • tf.contrib.legacy_seq2seq
  • tf.contrib.seq2seq

Datatypes

  • tf.SpareTensor

Save_Restore

  • List of uninitialized variables
  • Partial Initialization / Restore (for uninitialized variables)

Math operations

  • tf.contrib.distributions

Shape Transformations

  • nest

Normalization

  • Batch Normalization

tf_tutorial_plus's People

Contributors

healess avatar j-min avatar maestrojeong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tf_tutorial_plus's Issues

Problem with TrainingHelper's parameter sequence length

hi, I'm trying to implement a seq2seq model. when I use the actual sequence length as TrainingHelper's parameter, I get an error for the loss calculation:
InvalidArgumentError (see above for traceback): logits and labels must have the same first dimension, got logits shape [960,15038] and labels shape [1280]
But if I use all the same sequence length, the code works fine. what's the effects of using actual sequence length instead of using max sequence length?

Question : Train and Inference difference

Korean Is below

Hi, I'm beginner in tensorflow. After your tutorial(https://github.com/j-min/tf_tutorial_plus/blob/master/RNN_seq2seq/contrib_seq2seq/04_AttentionWrapper.ipynb), I have a question, So I write this.

After running your tutorial, I changed data for Korean tokenizing(white space).
I think there is no difference code. But in prediction, there are big difference between train and inference.

So if you have any idea about this(I think this may be hyper-parameter or difference between TrainingHelper and GreedyEmbeddingHelper), Any Comment will be thanks

These are my hyper-parameter and examples

Hyper-parameter:
enc_vocab_size : 2126
dec_vocab_size : 105
enc_sentence_length : 115
dec_sentence_length : 116
hidden_size : 64 or 128 or enc_vocab_size
attn_size = hidden_size

example :
In Train,prediction
Input(title): 마 이 수 야 여 성 용 아 디 오 재 킷
Prediction: _GO 4 7 10 _GO _GO _GO _GO _GO _GO _GO _GO _GO _GO _GO
Target(white space index):, 4 7 10

In Inference,prediction:
Input: 마 이 수 야 여 성 용 아 디 오 재 킷
Prediction: _GO 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
Target: 4 7 10


안녕하세요 텐서플로우 초보자라 해당 tutorial 을 따라하다 궁금한점이 있어서 문의 드립니다.

해당 tutorial을 작동하고 이후 데이터를 변경하여 한글 띄워쓰기를 시도해 봤는데 코드 관련 해서는 차이점이 없는데 train 과정과 inference 과정에서 차이가 너무 나서 혹시 Hyper Parameter나 혹은 TrainingHelper 와 GreedyEmbeddingHelper 관련 차이가 있는지 문의 드립니다.

하이퍼 파라미터:
enc_vocab_size : 2126
dec_vocab_size : 105
enc_sentence_length : 115
dec_sentence_length : 116
hidden_size : 64 or 128 or enc_vocab_size
attn_size = hidden_size

Train 과정에서의 추측 :
Input: 마 이 수 야 여 성 용 아 디 오 재 킷
Prediction: _GO 4 7 10 _GO _GO _GO _GO _GO _GO _GO _GO _GO _GO _GO
Target:, 4 7 10

Inference 과정에서의 추측 :
Input: 마 이 수 야 여 성 용 아 디 오 재 킷
Prediction: _GO 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
Target: 4 7 10

core_rnn_cell_impl not in ops.core_rnn_cell_impl in TF1.2

Thanks A Lot for your tutorial.

To support TF 1.2
I think you need to update below line
"from tensorflow.contrib.rnn.python.ops.core_rnn_cell_impl import * "
To
"from tensorflow.contrib.rnn import *"

Also to use "embedding_attention_seq2seq" set include path or use:
tf.contrib.legacy_seq2seq.embedding_attention_seq2seq

Thanks Again for your tutorial.

Is there an efficient way to do inference with non-embedding target sequence? Thanks!

I'm trying to train a seq2seq model to predict sequence point coordinates (like [0.1,0.3,0.2]), so I do not have embedding matrix in my model. According to your wonderful tutorial, I know that TrainingHelper is helpful when training my model, but I do not know how to do the inference after training. It seems InferenceHelper may help, but I do not know how to use it.

To simply my question, I need the output of step t-1 as input of step t, and output looks like this [0.1,0.3,0.2].

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.