yunjey / davian-tensorflow Goto Github PK
View Code? Open in Web Editor NEWtensorflow tutorial for beginner to intermediate
tensorflow tutorial for beginner to intermediate
Hello,
When I get to the part of creating the model:
model = Convnet ()
I get the following error:
`ValueError Traceback (most recent call last)
in ()
----> 1 model = Convnet()
in init(self, learning_rate)
22 correct_pred = tf.equal(pred, self.targets)
23 self.accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32))
---> 24 self.loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(out, self.targets))
25 self.train_op = tf.train.AdamOptimizer(self.learning_rate).minimize(self.loss)
~\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\ops\nn_ops.py in sparse_softmax_cross_entropy_with_logits(_sentinel, labels, logits, name)
2010 """
2011 _ensure_xent_args("sparse_softmax_cross_entropy_with_logits", _sentinel,
-> 2012 labels, logits)
2013
2014 # TODO(pcmurray) Raise an error when the label is not an index in
~\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\ops\nn_ops.py in _ensure_xent_args(name, sentinel, labels, logits)
1773 if sentinel is not None:
1774 raise ValueError("Only call %s
with "
-> 1775 "named arguments (labels=..., logits=..., ...)" % name)
1776 if labels is None or logits is None:
1777 raise ValueError("Both labels and logits must be provided.")
ValueError: Only call sparse_softmax_cross_entropy_with_logits
with named arguments (labels=..., logits=..., ...)`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.