Closed rxc205 closed 4 years ago
**### Q1:**
2020-01-08 14:53:39.963066: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1992 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:86:00.0, compute capability: 6.1)
2020-01-08 14:53:39.967101: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x64a3b70 executing computations on platform CUDA. Devices:
2020-01-08 14:53:39.967139: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce GTX 1080 Ti, Compute Capability 6.1
2020-01-08 14:53:41.875941: W tensorflow/core/framework/allocator.cc:107] Allocation of 512000000 exceeds 10% of system memory.
2020-01-08 14:53:42.320094: W tensorflow/core/framework/allocator.cc:107] Allocation of 512000000 exceeds 10% of system memory.
Traceback (most recent call last):
File "//anaconda3/envs/tf14/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call
return fn(*args)
File "//anaconda3/envs/tf14/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1339, in _run_fn
self._extend_graph()
File "//anaconda3/envs/tf14/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1374, in _extend_graph
tf_session.ExtendSession(self._session)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation embedding/embeddings/Initializer/random_uniform/sub: Could not satisfy explicit device specification '' because the node {{colocation_node embedding/embeddings/Initializer/random_uniform/sub}} was colocated with a group of nodes that required incompatible device '/job:localhost/replica:0/task:0/device:GPU:0'. All available devices [/job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:XLA_CPU:0, /job:localhost/replica:0/task:0/device:GPU:0, /job:localhost/replica:0/task:0/device:XLA_GPU:0].
Colocation Debug Info:
Colocation group had the following types and supported devices:
Root Member(assigned_device_nameindex=1 requested_devicename='/job:localhost/replica:0/task:0/device:GPU:0' assigned_devicename='/job:localhost/replica:0/task:0/device:GPU:0' resource_devicename='/job:localhost/replica:0/task:0/device:GPU:0' supported_devicetypes=[CPU] possibledevices=[]
ResourceSparseApplyKerasMomentum: CPU
Sub: GPU CPU XLA_CPU XLA_GPU
Add: GPU CPU XLA_CPU XLA_GPU
Fill: GPU CPU XLA_CPU XLA_GPU
Mul: GPU CPU XLA_CPU XLA_GPU
Const: GPU CPU XLA_CPU XLA_GPU
RandomUniform: GPU CPU XLA_CPU XLA_GPU
ReadVariableOp: GPU CPU XLA_CPU XLA_GPU
VarIsInitializedOp: GPU CPU XLA_CPU XLA_GPU
VarHandleOp: GPU CPU XLA_CPU XLA_GPU
AssignVariableOp: GPU CPU XLA_CPU XLA_GPU
ResourceGather: GPU CPU XLA_CPU XLA_GPU
Identity: GPU CPU XLA_CPU XLA_GPU
Colocation members, user-requested devices, and framework assigned devices, if any: embedding/embeddings/Initializer/random_uniform/shape (Const) embedding/embeddings/Initializer/random_uniform/min (Const) embedding/embeddings/Initializer/random_uniform/max (Const) embedding/embeddings/Initializer/random_uniform/RandomUniform (RandomUniform) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/Initializer/random_uniform/sub (Sub) embedding/embeddings/Initializer/random_uniform/mul (Mul) embedding/embeddings/Initializer/random_uniform (Add) embedding/embeddings (VarHandleOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/IsInitialized/VarIsInitializedOp (VarIsInitializedOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/Assign (AssignVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/Read/ReadVariableOp (ReadVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embedding_lookup (ResourceGather) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embedding_lookup/Identity (Identity) AssignVariableOp (AssignVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 ReadVariableOp (ReadVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 VarIsInitializedOp_5 (VarIsInitializedOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 SGD/embedding/embeddings/momentum/Initializer/zeros/shape_as_tensor (Const) SGD/embedding/embeddings/momentum/Initializer/zeros/Const (Const) SGD/embedding/embeddings/momentum/Initializer/zeros (Fill) SGD/embedding/embeddings/momentum (VarHandleOp) SGD/embedding/embeddings/momentum/IsInitialized/VarIsInitializedOp (VarIsInitializedOp) SGD/embedding/embeddings/momentum/Assign (AssignVariableOp) SGD/embedding/embeddings/momentum/Read/ReadVariableOp (ReadVariableOp) SGD/SGD/update_embedding/embeddings/ResourceSparseApplyKerasMomentum (ResourceSparseApplyKerasMomentum) VarIsInitializedOp_15 (VarIsInitializedOp)
[[{{node embedding/embeddings/Initializer/random_uniform/sub}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "//MyProject/Chinese-Word-Segmentation/code/predict.py", line 40, in
Colocation members, user-requested devices, and framework assigned devices, if any: embedding/embeddings/Initializer/random_uniform/shape (Const) embedding/embeddings/Initializer/random_uniform/min (Const) embedding/embeddings/Initializer/random_uniform/max (Const) embedding/embeddings/Initializer/random_uniform/RandomUniform (RandomUniform) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/Initializer/random_uniform/sub (Sub) embedding/embeddings/Initializer/random_uniform/mul (Mul) embedding/embeddings/Initializer/random_uniform (Add) embedding/embeddings (VarHandleOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/IsInitialized/VarIsInitializedOp (VarIsInitializedOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/Assign (AssignVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embeddings/Read/ReadVariableOp (ReadVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embedding_lookup (ResourceGather) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 embedding/embedding_lookup/Identity (Identity) AssignVariableOp (AssignVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 ReadVariableOp (ReadVariableOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 VarIsInitializedOp_5 (VarIsInitializedOp) framework assigned device=/job:localhost/replica:0/task:0/device:GPU:0 SGD/embedding/embeddings/momentum/Initializer/zeros/shape_as_tensor (Const) SGD/embedding/embeddings/momentum/Initializer/zeros/Const (Const) SGD/embedding/embeddings/momentum/Initializer/zeros (Fill) SGD/embedding/embeddings/momentum (VarHandleOp) SGD/embedding/embeddings/momentum/IsInitialized/VarIsInitializedOp (VarIsInitializedOp) SGD/embedding/embeddings/momentum/Assign (AssignVariableOp) SGD/embedding/embeddings/momentum/Read/ReadVariableOp (ReadVariableOp) SGD/SGD/update_embedding/embeddings/ResourceSparseApplyKerasMomentum (ResourceSparseApplyKerasMomentum) VarIsInitializedOp_15 (VarIsInitializedOp)
[[node embedding/embeddings/Initializer/random_uniform/sub (defined at /MyProject/Chinese-Word-Segmentation/code/model.py:109) ]]Additional information about colocations:No node-device colocations were active during op 'embedding/embeddings/Initializer/random_uniform/sub' creation.
Device assignments active during op 'embedding/embeddings/Initializer/random_uniform/sub' creation: with tf.device(None): </anaconda3/envs/tf14/lib/python3.6/site-packages/tensorflow/python/ops/resource_variable_ops.py:602>
Original stack trace for 'embedding/embeddings/Initializer/random_uniform/sub':
File "/MyProject/Chinese-Word-Segmentation/code/predict.py", line 40, in
Process finished with exit code 1
I got this result, i dont know why。can you help me ,thank you !!!
i train the model for 100 epochs the best weights only saved the 4th epoch's. But the accuracy is still increasing .
Run: python3 predict.py input_path output_path resources_path
Exactly what was described in the README. What errors are you having?