每当我尝试打印时,我总会得到截断结果
import tensorflow as tf
import numpy as np
np.set_printoptions(threshold=np.nan)
tensor = tf.constant(np.ones(999))
tensor = tf.Print(tensor, [tensor])
sess = tf.Session()
sess.run(tensor)
正如您所看到的,我已经按照Print full value of tensor into console or write to file in tensorflow
上找到的指南进行了操作但输出只是
... \ core \ kernels \ logging_ops.cc:79] [1 1 1 ...]
我希望看到完整的张量,谢谢。
答案 0 :(得分:8)
通过查看tf.Print
summarize=n
,可以轻松解决此问题。通过n
,其中def float_():
price_data = {}
str_num = '3.505,32'
price_data['price'] = float(str_num.replace('.','').replace(',','.'))
price_data['currency'] = 'USD'
return price_data
是您要显示的元素数量。
答案 1 :(得分:0)
你可以这样做:
SpreadsheetApp.getActiveSheet().getRange('A1:B5').sort(1);