Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Tensorflow通用句子编码器(lite)崩溃_Python_Tensorflow_Nlp_Out Of Memory_Text Processing - Fatal编程技术网

Python Tensorflow通用句子编码器(lite)崩溃

Python Tensorflow通用句子编码器(lite)崩溃,python,tensorflow,nlp,out-of-memory,text-processing,Python,Tensorflow,Nlp,Out Of Memory,Text Processing,我在运行Tensorflow的通用句子编码器实现时遇到了问题。我有很多文本文件,里面有很多文本。我试过通用句子编码器和它的精简版。当我在文件的子集上运行它们时,它们会工作,但如果我在所有文件上运行它们,它们都会崩溃。以下是lite版本()中的代码段: 在我的例子中,这些消息只是由大约5K个单词组成的字符串,其中有20K个单词 对于lite版本,程序运行约5-10分钟,然后只说“已终止”: 对于正常版本,我在这里提出了另一个问题:错误 我正在运行的机器具有以下规格: CPU: 16 vCPUs R

我在运行Tensorflow的通用句子编码器实现时遇到了问题。我有很多文本文件,里面有很多文本。我试过通用句子编码器和它的精简版。当我在文件的子集上运行它们时,它们会工作,但如果我在所有文件上运行它们,它们都会崩溃。以下是lite版本()中的代码段:

在我的例子中,这些消息只是由大约5K个单词组成的字符串,其中有20K个单词

对于lite版本,程序运行约5-10分钟,然后只说“已终止”:

对于正常版本,我在这里提出了另一个问题:错误

我正在运行的机器具有以下规格:

CPU: 16 vCPUs
RAM: 60GB
Boot Source: Local 
System Disk: 40GB
Data Disk: 600GB (2 disks)
Network: 5Gb / s

通常,当内存不足时,我会减小训练批大小,但这里的模型已经训练过了。我不知道如何防止程序崩溃。我怀疑问题来自np内积或消息嵌入计算。
(pipeline) root@pavel-nlu:~/petar# python3 main-lite.py 
WARNING:tensorflow:From /root/miniconda3/envs/pipeline/lib/python3.9/site-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
sys:1: DtypeWarning: Columns (105,106) have mixed types.Specify dtype option on import or set low_memory=False.
2021-05-22 11:47:21.838581: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-05-22 11:47:21.839022: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  SSE4.1 SSE4.2 AVX
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-05-22 11:47:21.841543: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
2021-05-22 11:47:23.039857: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:196] None of the MLIR optimization passes are enabled (registered 0 passes)
2021-05-22 11:47:23.208778: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2593520000 Hz
SentencePiece model loaded at b'/tmp/tfhub_modules/539544f0a997d91c327c23285ea00c37588d92cc/assets/universal_encoder_8k_spm.model'.
Killed
CPU: 16 vCPUs
RAM: 60GB
Boot Source: Local 
System Disk: 40GB
Data Disk: 600GB (2 disks)
Network: 5Gb / s