tfblogs_2017's People
Forkers
mansworld88 amygdala markhowlandphd jkloop45 andriusland shanren7 december-boy twoyoungtwosimpletfblogs_2017's Issues
file close in with scope
with open(file, "wb") as f:
f.write(data)
f.close()
Why use f.close() in with scope? To my understanding, 'with' syntax wll do release task by itself. Am I right?
AttributeError: 'list' object has no attribute 'get_shape' running Blog_Estimators_DataSet
TensorFlow version: 1.6.0
AttributeError Traceback (most recent call last)
in ()
76 return batch_features, batch_labels
77
---> 78 next_batch = my_input_fn(FILE_TRAIN, True) # Will return 32 random elements
79
80 # Create the feature_columns, which specifies the input to our model
in my_input_fn(file_path, perform_shuffle, repeat_count)
66 dataset = (tf.data.TextLineDataset(file_path) # Read text file
67 .skip(1) # Skip header row
---> 68 .map(decode_csv)) # Transform each elem by applying decode_csv fn
69 if perform_shuffle:
70 # Randomizes input using a window of 256 elements (read into memory)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.pyc in map(self, map_func, num_parallel_calls)
788 """
789 if num_parallel_calls is None:
--> 790 return MapDataset(self, map_func)
791 else:
792 return ParallelMapDataset(self, map_func, num_parallel_calls)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.pyc in init(self, input_dataset, map_func)
1595
1596 self._map_func = tf_map_func
-> 1597 self._map_func.add_to_graph(ops.get_default_graph())
1598
1599 def _as_variant_tensor(self):
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/function.pyc in add_to_graph(self, g)
484 def add_to_graph(self, g):
485 """Adds this function into the graph g."""
--> 486 self._create_definition_if_needed()
487
488 # Adds this function into 'g'.
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/function.pyc in _create_definition_if_needed(self)
319 """Creates the function definition if it's not created yet."""
320 with context.graph_mode():
--> 321 self._create_definition_if_needed_impl()
322
323 def _create_definition_if_needed_impl(self):
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/function.pyc in _create_definition_if_needed_impl(self)
336 # Call func and gather the output tensors.
337 with vs.variable_scope("", custom_getter=temp_graph.getvar):
--> 338 outputs = self._func(*inputs)
339
340 # There is no way of distinguishing between a function not returning
/usr/local/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.pyc in tf_map_func(*args)
1583 self._output_classes = sparse.get_classes(ret)
1584 self._output_shapes = nest.pack_sequence_as(
-> 1585 ret, [t.get_shape() for t in nest.flatten(ret)])
1586 self._output_types = nest.pack_sequence_as(
1587 ret, [t.dtype for t in nest.flatten(ret)])
AttributeError: 'list' object has no attribute 'get_shape'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.