腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(370)
视频
沙龙
2
回答
python如何定位导入的函数
import tensorflow as tf当运行上面的代码时,python如何定位函数
tf.abs
?这个函数是在tensorflow/python/ops/mathops.py中定义的,为什么它可以被称为
tf.abs
?
浏览 2
提问于2017-03-22
得票数 0
2
回答
如何将以下TensorFlow代码转换为PyTorch?
、
、
、
我正在搜索GAN模型的损失函数,然后this one出现了: gd_loss = tf.reduce_sum(tf.square(
tf.abs
(dx_real) -
tf.abs
(dx_fake)))+ \ tf.reduce_sum(tf.square(
tf.abs
(dz_real) -
tf.abs
(d
浏览 46
提问于2021-01-14
得票数 0
1
回答
Tensorflow从张量和蒙版创建新张量
、
这是现在的代码: def stc_compression(tensor, sparsification_rate): tensor_masked = tf.multiply(tensor, mask) average = tf.reduce_mean(
tf.abs
(tensor_masked)) /
浏览 17
提问于2021-10-15
得票数 -1
回答已采纳
1
回答
丹索尔流蟒蛇。ValueError:非标量张量不能转换为布尔值
、
、
代码附后如下:import numpy as np if
tf.abs
(x) <=
tf.abs
(m):\testTensorboard\testTensorboard\dataset.py", line 5, in log_huber .
浏览 0
提问于2019-03-04
得票数 1
回答已采纳
1
回答
Tensorflow计算图像梯度损失
def image_gradient_loss(y_prediction, y):
tf.abs
(
tf.abs
(y_pr
浏览 2
提问于2017-10-31
得票数 2
15
回答
NaN虫?
、
添加print "max b vales: %g %g %g %g"%(tf.reduce_max(
tf.abs
浏览 11
提问于2015-11-14
得票数 68
回答已采纳
1
回答
如何在tensorflow中实现过滤器?
、
、
我有一个卷积神经网络,有三个图像作为输入:x_positive = tf.placeholder('float', [None, 4900], name='x_positive')在train函数中,我向占位符提供实际图像:
浏览 5
提问于2017-10-22
得票数 4
回答已采纳
1
回答
实现minmax最大池层
、
、
、
、
我需要实现一个最小最大池层。我有四维张量(batch_size,高度,宽度,activation_maps).我附了一个例子来说明问题。我有一个想法,在输入张量x上执行最大池操作两次。一次关于原张量,第二次是否定它。在此基础上,对所得结果进行比较,选择最大绝对值。然而,我被困住了。我已经粘贴了下面的代码。任何进一步的帮助都会很好。class CustomMaxPooling(tf.keras.layers.Layer): def __init__(self, pool_size
浏览 3
提问于2021-04-20
得票数 2
1
回答
OperatorNotAllowedInGraphError:不允许使用`tf.Tensor`作为Python `bool`:( tf周期GAN错误)
、
、
、
、
cycled_y) loss1 = tf.reduce_mean(
tf.abs
# In[ ]: loss1 = tf.reduce_mean(
tf.abs
identity_loss = |G(Y)-Y|+|F(X)-X|''' def identity_
浏览 294
提问于2020-08-12
得票数 3
回答已采纳
1
回答
更新Tensorflow中的变量片
、
、
、
2] - input[:,:width-2])yGrad = (
tf.abs
(yGrad1) +
tf.abs
(yGrad2)) / 2 output = tf.reduce_sum(
浏览 2
提问于2017-11-23
得票数 1
回答已采纳
2
回答
在tensorflow中以元素方式获取两个张量中的较高值
、
我知道我能做到:但随后: c= tf.cast(mask, tf.float32) * a + tf.cast(~mask, tf.float32
浏览 0
提问于2018-06-03
得票数 0
4
回答
如何结合tf.absolute和tf.square在Tensorflow中创建Huber损失函数?
、
、
fn_choice_maker1, fn_choice_maker2)) abs_contrib =
tf.abs
(y - y_)-0.25 - tf.mul(choice_maker_sqr,
tf.abs
(y - y_)-0.25) loss = tf.reduce_mean(sqr_contrib + abs_contrib
浏览 5
提问于2016-08-24
得票数 6
1
回答
如何强制自动编码器中的瓶颈产生二进制值?
、
、
、
def binarize_loss(value): binarized_loss_value = tf.map_fn(binarize_loss, neckLayer.output
浏览 4
提问于2020-03-20
得票数 2
回答已采纳
1
回答
神经网络:设计成本函数“不可微”/ Tensorflow
、
accuracy'): correct_prediction = tf.less_equal(
tf.abs
((y_predicted-y_)), 0.1*
tf.abs
((y_))) # True if y_diff <= 10% * y_actual with tf.name_scope('accuracytf.scalar_summary('accuracy', accurac
浏览 0
提问于2016-05-11
得票数 1
2
回答
为什么在损失函数中使用平均值而不是总和?
、
、
、
def mae_loss(y_true, y_pred): return lossdefmae_loss(y_true, y_pred): return loss 在Keras源代码中也使用了
浏览 2
提问于2018-12-10
得票数 2
1
回答
如何将MeanIoU应用于多输出模型?
、
、
我有一个基于MobileNet v2的模型,它有两个输出:类(猫/狗)和脸坐标。因此,“类”输出有BinaryCrossentropy丢失,"bbox“输出有YOLO (在代码中)。问题是,当我试图应用度量(类和MeanIOU的准确性)时:TypeError: '>' not supported between instances of 'NoneType' and 'int' 我怀疑我在某种程度上搞砸
浏览 4
提问于2022-11-17
得票数 -1
1
回答
Tensorflow :更新某个条件下的某些张量指数
、
、
、
我正在使用Tensorflow,我想将以下条件应用于我的tensor value = log(value) value = -log(-value)minone = tf.constant(-1, dtype=tf.float32)idx = tf.where(condition)log = -tf.log(-portion) X = tf.scatter_nd_update(X,
浏览 0
提问于2017-10-15
得票数 0
1
回答
Tensorflow:组合度量以改进成本函数
、
、
、
、
prediction + tf.reduce_mean(tf.divide(error,
tf.abs
浏览 1
提问于2017-11-27
得票数 1
回答已采纳
1
回答
张量阵的归一化
、
=0: tmp_index = tf.argmax(tmp_abs,0) tmp_index1
浏览 0
提问于2018-02-16
得票数 1
回答已采纳
1
回答
如何在TF2中构建带公差的自定义精度指标?
、
、
、
、
""" """ differnece =
tf.abs
浏览 17
提问于2021-02-22
得票数 1
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
TF新工具AutoGraph:将Python转换为TensorFlow图
TensorFlow:重要更新AutoGraph发布,能自动将Python语言转化为TF计算图
机器学习100天-Day10 Tensorflow实现KNN算法
TensorFlow.js入门(一)一维向量的学习
Python学习一
热门
标签
更多标签
云服务器
ICP备案
实时音视频
即时通信 IM
对象存储
活动推荐
运营活动
广告
关闭
领券