Skip to content

train_inputs placeholder and batch does not match. #3

@PratsBhatt

Description

@PratsBhatt

There is a bug in your code. The batch and training input does not match.

skip_window = 1       # How many words to consider left and right.
num_skips = 2  
batch = np.ndarray(shape=(batch_size, num_skips), dtype=np.int32)
train_inputs = tf.placeholder(tf.int32,shape=[batch_size, skip_window * 2])

batch_temp = np.ndarray(shape=(num_skips), dtype=np.int32)

currently it is working because the skip_window is 1 and num_skip is 2. when you change either of them it starts to crack.

I suppose the fix is to change it to skip_window but I am not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions