Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphDef cannot be larger than 2GB. #4

Open
pranavi77 opened this issue Apr 3, 2018 · 0 comments
Open

GraphDef cannot be larger than 2GB. #4

pranavi77 opened this issue Apr 3, 2018 · 0 comments

Comments

@pranavi77
Copy link

TensorFlow Version: 1.3.0
INFO:tensorflow:Restoring parameters from b'C:/Users/uidk4301/Desktop/fcn8s_tensorflow-master/VGG-16_mod2FCN_ImageNet-Classification/variables\variables'


ValueError Traceback (most recent call last)
in ()
3 vgg16_dir='C:/Users/uidk4301/Desktop/fcn8s_tensorflow-master/VGG-16_mod2FCN_ImageNet-Classification/',
4 num_classes=num_classes,
----> 5 variables_load_dir=None)

C:\Users\uidk4301\Desktop\fcn8s_tensorflow-master\fcn8s_tensorflow.py in init(self, model_load_dir, tags, vgg16_dir, num_classes, variables_load_dir)
104
105 # Load the pretrained convolutionalized VGG-16 model as our encoder.
--> 106 self.image_input, self.keep_prob, self.pool3_out, self.pool4_out, self.fc7_out = self._load_vgg16()
107 # Build the decoder on top of the VGG-16 encoder.
108 self.fcn8s_output, self.l2_regularization_rate = self._build_decoder()

C:\Users\uidk4301\Desktop\fcn8s_tensorflow-master\fcn8s_tensorflow.py in _load_vgg16(self)
132 # 1: Load the model
133
--> 134 tf.saved_model.loader.load(sess=self.sess, tags=[self.vgg16_tag], export_dir=self.vgg16_dir)
135
136 # 2: Return the tensors of interest

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\saved_model\loader_impl.py in load(sess, tags, export_dir, **saver_kwargs)
224
225 # Restore the variables using the built saver in the provided session.
--> 226 saver.restore(sess, variables_path)
227 else:
228 tf_logging.info("The specified SavedModel has no variables; no "

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py in restore(self, sess, save_path)
1558 logging.info("Restoring parameters from %s", save_path)
1559 sess.run(self.saver_def.restore_op_name,
-> 1560 {self.saver_def.filename_tensor_name: save_path})
1561
1562 @staticmethod

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\client\session.py in run(self, fetches, feed_dict, options, run_metadata)
893 try:
894 result = self._run(None, fetches, feed_dict, options_ptr,
--> 895 run_metadata_ptr)
896 if run_metadata:
897 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
1122 if final_fetches or final_targets or (handle and feed_dict_tensor):
1123 results = self._do_run(handle, final_targets, final_fetches,
-> 1124 feed_dict_tensor, options, run_metadata)
1125 else:
1126 results = []

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\client\session.py in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
1319 if handle is None:
1320 return self._do_call(_run_fn, self._session, feeds, fetches, targets,
-> 1321 options, run_metadata)
1322 else:
1323 return self._do_call(_prun_fn, self._session, handle, feeds, fetches)

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args)
1325 def _do_call(self, fn, *args):
1326 try:
-> 1327 return fn(*args)
1328 except errors.OpError as e:
1329 message = compat.as_text(e.message)

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\client\session.py in _run_fn(session, feed_dict, fetch_list, target_list, options, run_metadata)
1295 run_metadata):
1296 # Ensure any changes to the graph are reflected in the runtime.
-> 1297 self._extend_graph()
1298 with errors.raise_exception_on_not_ok_status() as status:
1299 if self._created_with_new_api:

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\client\session.py in _extend_graph(self)
1351 graph_def, self._current_version = self._graph._as_graph_def(
1352 from_version=self._current_version,
-> 1353 add_shapes=self._add_shapes)
1354 # pylint: enable=protected-access
1355

C:\Users\uidk4301\AppData\Local\Continuum\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py in _as_graph_def(self, from_version, add_shapes)
2444 bytesize += op.node_def.ByteSize()
2445 if bytesize >= (1 << 31) or bytesize < 0:
-> 2446 raise ValueError("GraphDef cannot be larger than 2GB.")
2447 if self._functions:
2448 for f in self._functions.values():

ValueError: GraphDef cannot be larger than 2GB.

I am getting this while loading model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant