当前位置:网站首页>get_edges
get_edges
2022-06-23 15:09:00 【代码小白的成长】
def get_edges(self, t):
torchvision.transforms.ToPILImage()(t[0].cpu()).show()
edge = self.ByteTensor(t.size()).zero_()
edge[:, :, :, 1:] = edge[:, :, :, 1:] | (t[:, :, :, 1:] != t[:, :, :, :-1])
edge[:, :, :, :-1] = edge[:, :, :, :-1] | (t[:, :, :, 1:] != t[:, :, :, :-1])
edge[:, :, 1:, :] = edge[:, :, 1:, :] | (t[:, :, 1:, :] != t[:, :, :-1, :])
edge[:, :, :-1, :] = edge[:, :, :-1, :] | (t[:, :, 1:, :] != t[:, :, :-1, :])
torchvision.transforms.ToPILImage()(edge.float()[0].cpu()).show()
return edge.float()

边栏推荐
猜你喜欢

Half wave loss equal thickness and equal inclination interference

Introduction to the push function in JS

MySQL日志管理怎么配置

MySQL series: overview of the overall architecture

The running rabbit fell

Important knowledge of golang: timer timer

Summary of operating system underlying knowledge (interview)

Gartner最新报告:低代码应用开发平台在国内的发展

JS create an array (literal)

The work and development steps that must be done in the early stage of the development of the source code of the live broadcasting room
随机推荐
【无标题】激光焊接在医疗中的应用
SQL injection vulnerability (principle)
ABP框架之——数据访问基础架构(下)
股票开账户如何优惠开户?在线开户安全么?
请问期货开户去哪个平台好?网上期货开户安全吗?
FPGA 常用缩写及单词在工程领域内的意义
列表查询排序参数处理
mysql事务与锁
FPN特征金字塔网络
5 minutes to quickly launch web applications and APIs (vercel)
MQ消息中间件理论详解
力扣每日一题-第25天-495.提莫攻击
Gartner's latest report: development of low code application development platform in China
快速排序的簡單理解
Personal summary of system design and Analysis Course Project
云上探“店”,云商店全新升级!
JS里的数组
Sectigo(Comodo)证书的由来
2022年个人理财利率是多少?个人如何选择理财产品?
[MAE]Masked Autoencoders掩膜自编码器