weights initialization in tensorflow for n-dimensional inputUse tensorflow tf.Variable instead of tf.placeholder for train dataTensorflow: Input to reshape is a tensor with 79744 values, but the requested shape has 203392How to reshape the pre-trained weights to input them to 3d convoluional neural network?Simple Feedforward Neural Network with TensorFlow won't learnCan't run prediciton because of troubles with tf.placeholderpython tensorflow: How to avoid giving feed_dict to every sess.run()?Storing TensorFlow network weights in Python multi-dimensional listsTensorFlow object detection api: classification weights initialization when changing number of classes at training using pre-trained modelsHow to implement pre-training in Tensorflow? How to partially use saved weights from checkpoint file?Can you Transpose/Reverse the shape in Tensorflow's placeholder?

Draw a symmetric alien head

What preparations would Hubble have needed to return in a Shuttle?

In a list with unique pairs A, B, how can I sort them so that the last B is the first A in the next pair?

Leaving job close to major deadlines

How "fast" do astronomical events occur?

Why there is a red color in right side?

What is the highest power supply a Raspberry pi 3 B can handle without getting damaged?

Setting up the trap

In the US, can a former president run again?

I just entered the USA without passport control at Atlanta airport

Scaling an object to change its key

What kind of chart is this?

How did Frodo know where the Bree village was?

Bent arrow under a node

How to compute the inverse of an operation in Q#?

In Street Fighter, what does the M stand for in M Bison?

reverse a call to mmap()

How to write a nice frame challenge?

Unrecognized IC Package Style

How can I prevent a user from copying files on another hard drive?

First occurrence in the Sixers sequence

Is Newton's third law really correct?

How to make all magic-casting innate, but still rare?

Why is it 出差去 and not 去出差?



weights initialization in tensorflow for n-dimensional input


Use tensorflow tf.Variable instead of tf.placeholder for train dataTensorflow: Input to reshape is a tensor with 79744 values, but the requested shape has 203392How to reshape the pre-trained weights to input them to 3d convoluional neural network?Simple Feedforward Neural Network with TensorFlow won't learnCan't run prediciton because of troubles with tf.placeholderpython tensorflow: How to avoid giving feed_dict to every sess.run()?Storing TensorFlow network weights in Python multi-dimensional listsTensorFlow object detection api: classification weights initialization when changing number of classes at training using pre-trained modelsHow to implement pre-training in Tensorflow? How to partially use saved weights from checkpoint file?Can you Transpose/Reverse the shape in Tensorflow's placeholder?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















training set x_train contain 10k examples and each input is of shape(10,23201)
and when i try to send the total training set for training it giving an error
but when i send 10 examples at a time it working fine.
How to change the code that will take all examples at once(what shape of weights will change my probllem)?



input_features = 23201
hidden_layer_1 = 300
hidden_layer_2 = 300
hidden_layer_3 = 128

limit_1 = tf.cast(np.sqrt(6/(input_features+hidden_layer_1)), tf.float32)
limit_2 = tf.cast(np.sqrt(6/(hidden_layer_1+hidden_layer_2)), tf.float32)
limit_3 = tf.cast(np.sqrt(6/(hidden_layer_2+hidden_layer_3)), tf.float32)
#weights initialization
w0 = tf.Variable(tf.random_uniform([10, input_features, hidden_layer_1], -limit_1, limit_1))
w1 = tf.Variable(tf.random_uniform([10, hidden_layer_1, hidden_layer_2],-limit_2, limit_2))
w2 = tf.Variable(tf.random_uniform([10, hidden_layer_2, hidden_layer_3], -limit_3, limit_3))

#biases initializatrion
b0 = tf.Variable(tf.random_uniform([10, hidden_layer_1], -limit_1, limit_1))
b1 = tf.Variable(tf.random_uniform([10, hidden_layer_2], -limit_2, limit_2))
b2 = tf.Variable(tf.random_uniform([10, hidden_layer_3], -limit_3, limit_3))

q_x = tf.placeholder("float32", shape=[None, 10, input_features])
d_x = tf.placeholder("float32", shape=[None, 10, input_features])
y = tf.placeholder("float32", shape=[None, 10])









share|improve this question






















  • Is something preventing you from flattening the inputs? If yes, then you will need to read math.stackexchange.com/questions/63074/… because without these concepts you will struggle to maintain the shape of the matrix

    – anand_v.singh
    Mar 25 at 6:19











  • no it's not about flattening

    – Raju Komati
    Mar 25 at 6:26











  • If you are determined to use a 3D tensor, then you need to learn about tensor contraction and manage your layer dimensions accordingly.

    – anand_v.singh
    Mar 25 at 6:36











  • Weight matrices and bias vectors do not have anything do with your sample size. It depends on model parameters.

    – ARAT
    Mar 25 at 15:10

















0















training set x_train contain 10k examples and each input is of shape(10,23201)
and when i try to send the total training set for training it giving an error
but when i send 10 examples at a time it working fine.
How to change the code that will take all examples at once(what shape of weights will change my probllem)?



input_features = 23201
hidden_layer_1 = 300
hidden_layer_2 = 300
hidden_layer_3 = 128

limit_1 = tf.cast(np.sqrt(6/(input_features+hidden_layer_1)), tf.float32)
limit_2 = tf.cast(np.sqrt(6/(hidden_layer_1+hidden_layer_2)), tf.float32)
limit_3 = tf.cast(np.sqrt(6/(hidden_layer_2+hidden_layer_3)), tf.float32)
#weights initialization
w0 = tf.Variable(tf.random_uniform([10, input_features, hidden_layer_1], -limit_1, limit_1))
w1 = tf.Variable(tf.random_uniform([10, hidden_layer_1, hidden_layer_2],-limit_2, limit_2))
w2 = tf.Variable(tf.random_uniform([10, hidden_layer_2, hidden_layer_3], -limit_3, limit_3))

#biases initializatrion
b0 = tf.Variable(tf.random_uniform([10, hidden_layer_1], -limit_1, limit_1))
b1 = tf.Variable(tf.random_uniform([10, hidden_layer_2], -limit_2, limit_2))
b2 = tf.Variable(tf.random_uniform([10, hidden_layer_3], -limit_3, limit_3))

q_x = tf.placeholder("float32", shape=[None, 10, input_features])
d_x = tf.placeholder("float32", shape=[None, 10, input_features])
y = tf.placeholder("float32", shape=[None, 10])









share|improve this question






















  • Is something preventing you from flattening the inputs? If yes, then you will need to read math.stackexchange.com/questions/63074/… because without these concepts you will struggle to maintain the shape of the matrix

    – anand_v.singh
    Mar 25 at 6:19











  • no it's not about flattening

    – Raju Komati
    Mar 25 at 6:26











  • If you are determined to use a 3D tensor, then you need to learn about tensor contraction and manage your layer dimensions accordingly.

    – anand_v.singh
    Mar 25 at 6:36











  • Weight matrices and bias vectors do not have anything do with your sample size. It depends on model parameters.

    – ARAT
    Mar 25 at 15:10













0












0








0








training set x_train contain 10k examples and each input is of shape(10,23201)
and when i try to send the total training set for training it giving an error
but when i send 10 examples at a time it working fine.
How to change the code that will take all examples at once(what shape of weights will change my probllem)?



input_features = 23201
hidden_layer_1 = 300
hidden_layer_2 = 300
hidden_layer_3 = 128

limit_1 = tf.cast(np.sqrt(6/(input_features+hidden_layer_1)), tf.float32)
limit_2 = tf.cast(np.sqrt(6/(hidden_layer_1+hidden_layer_2)), tf.float32)
limit_3 = tf.cast(np.sqrt(6/(hidden_layer_2+hidden_layer_3)), tf.float32)
#weights initialization
w0 = tf.Variable(tf.random_uniform([10, input_features, hidden_layer_1], -limit_1, limit_1))
w1 = tf.Variable(tf.random_uniform([10, hidden_layer_1, hidden_layer_2],-limit_2, limit_2))
w2 = tf.Variable(tf.random_uniform([10, hidden_layer_2, hidden_layer_3], -limit_3, limit_3))

#biases initializatrion
b0 = tf.Variable(tf.random_uniform([10, hidden_layer_1], -limit_1, limit_1))
b1 = tf.Variable(tf.random_uniform([10, hidden_layer_2], -limit_2, limit_2))
b2 = tf.Variable(tf.random_uniform([10, hidden_layer_3], -limit_3, limit_3))

q_x = tf.placeholder("float32", shape=[None, 10, input_features])
d_x = tf.placeholder("float32", shape=[None, 10, input_features])
y = tf.placeholder("float32", shape=[None, 10])









share|improve this question














training set x_train contain 10k examples and each input is of shape(10,23201)
and when i try to send the total training set for training it giving an error
but when i send 10 examples at a time it working fine.
How to change the code that will take all examples at once(what shape of weights will change my probllem)?



input_features = 23201
hidden_layer_1 = 300
hidden_layer_2 = 300
hidden_layer_3 = 128

limit_1 = tf.cast(np.sqrt(6/(input_features+hidden_layer_1)), tf.float32)
limit_2 = tf.cast(np.sqrt(6/(hidden_layer_1+hidden_layer_2)), tf.float32)
limit_3 = tf.cast(np.sqrt(6/(hidden_layer_2+hidden_layer_3)), tf.float32)
#weights initialization
w0 = tf.Variable(tf.random_uniform([10, input_features, hidden_layer_1], -limit_1, limit_1))
w1 = tf.Variable(tf.random_uniform([10, hidden_layer_1, hidden_layer_2],-limit_2, limit_2))
w2 = tf.Variable(tf.random_uniform([10, hidden_layer_2, hidden_layer_3], -limit_3, limit_3))

#biases initializatrion
b0 = tf.Variable(tf.random_uniform([10, hidden_layer_1], -limit_1, limit_1))
b1 = tf.Variable(tf.random_uniform([10, hidden_layer_2], -limit_2, limit_2))
b2 = tf.Variable(tf.random_uniform([10, hidden_layer_3], -limit_3, limit_3))

q_x = tf.placeholder("float32", shape=[None, 10, input_features])
d_x = tf.placeholder("float32", shape=[None, 10, input_features])
y = tf.placeholder("float32", shape=[None, 10])






tensorflow






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 25 at 6:09









Raju KomatiRaju Komati

34




34












  • Is something preventing you from flattening the inputs? If yes, then you will need to read math.stackexchange.com/questions/63074/… because without these concepts you will struggle to maintain the shape of the matrix

    – anand_v.singh
    Mar 25 at 6:19











  • no it's not about flattening

    – Raju Komati
    Mar 25 at 6:26











  • If you are determined to use a 3D tensor, then you need to learn about tensor contraction and manage your layer dimensions accordingly.

    – anand_v.singh
    Mar 25 at 6:36











  • Weight matrices and bias vectors do not have anything do with your sample size. It depends on model parameters.

    – ARAT
    Mar 25 at 15:10

















  • Is something preventing you from flattening the inputs? If yes, then you will need to read math.stackexchange.com/questions/63074/… because without these concepts you will struggle to maintain the shape of the matrix

    – anand_v.singh
    Mar 25 at 6:19











  • no it's not about flattening

    – Raju Komati
    Mar 25 at 6:26











  • If you are determined to use a 3D tensor, then you need to learn about tensor contraction and manage your layer dimensions accordingly.

    – anand_v.singh
    Mar 25 at 6:36











  • Weight matrices and bias vectors do not have anything do with your sample size. It depends on model parameters.

    – ARAT
    Mar 25 at 15:10
















Is something preventing you from flattening the inputs? If yes, then you will need to read math.stackexchange.com/questions/63074/… because without these concepts you will struggle to maintain the shape of the matrix

– anand_v.singh
Mar 25 at 6:19





Is something preventing you from flattening the inputs? If yes, then you will need to read math.stackexchange.com/questions/63074/… because without these concepts you will struggle to maintain the shape of the matrix

– anand_v.singh
Mar 25 at 6:19













no it's not about flattening

– Raju Komati
Mar 25 at 6:26





no it's not about flattening

– Raju Komati
Mar 25 at 6:26













If you are determined to use a 3D tensor, then you need to learn about tensor contraction and manage your layer dimensions accordingly.

– anand_v.singh
Mar 25 at 6:36





If you are determined to use a 3D tensor, then you need to learn about tensor contraction and manage your layer dimensions accordingly.

– anand_v.singh
Mar 25 at 6:36













Weight matrices and bias vectors do not have anything do with your sample size. It depends on model parameters.

– ARAT
Mar 25 at 15:10





Weight matrices and bias vectors do not have anything do with your sample size. It depends on model parameters.

– ARAT
Mar 25 at 15:10












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55332090%2fweights-initialization-in-tensorflow-for-n-dimensional-input%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55332090%2fweights-initialization-in-tensorflow-for-n-dimensional-input%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현