在这篇文章中,我们将带领您了解播放ScalaJSONReads[T]解析ValidationError的全貌,包括error.path.missing,WrappedArray的相关情况。同时,我们还
在这篇文章中,我们将带领您了解播放ScalaJSON Reads [T]解析ValidationError的全貌,包括error.path.missing,WrappedArray的相关情况。同时,我们还将为您介绍有关### Error building SqlSession. ### The error may exist in SQL Mapper Configuration ### Cause: org...、6.mybatis 异常:SQL Mapper Configuration,Error parsing Mapper XML,Could not resolve type alias、Background Suppression Network for Weakly-supervised Temporal Action Localization [Paper Reading]、BOM validation - cannot find where this error message is raised的知识,以帮助您更好地理解这个主题。
本文目录一览:- 播放ScalaJSON Reads [T]解析ValidationError(error.path.missing,WrappedArray())(播放器scan什么意思)
- ### Error building SqlSession. ### The error may exist in SQL Mapper Configuration ### Cause: org...
- 6.mybatis 异常:SQL Mapper Configuration,Error parsing Mapper XML,Could not resolve type alias
- Background Suppression Network for Weakly-supervised Temporal Action Localization [Paper Reading]
- BOM validation - cannot find where this error message is raised
播放ScalaJSON Reads [T]解析ValidationError(error.path.missing,WrappedArray())(播放器scan什么意思)
我有一个有趣的json数据,看起来像:
[ {
"internal_network" : [ {
"address" : [ {
"address_id" : 2,"address" : "172.16.20.1/24"
},{
"address_id" : 1,"address" : "172.16.30.30/24"
} ]
} ],"switch_id" : "0000000000000001"
},{
"internal_network" : [ {
"address" : [ {
"address_id" : 2,"address" : "172.16.30.1/24"
},"address" : "192.168.10.1/24"
},{
"address_id" : 3,"address" : "172.16.10.1/24"
} ]
} ],"switch_id" : "0000000000000002"
} ]
我写了案例类和自定义内容:
case class TheAddress(addr: (Int,String))
implicit val theAddressReads: Reads[TheAddress] = (
(__ \ "address_id").read[Int] and
(__ \ "address").read[String] tupled) map (TheAddress.apply _)
case class Addresses(addr: List[TheAddress])
implicit val addressesReads: Reads[Addresses] =
(__ \ "address").read(list[TheAddress](theAddressReads)) map (Addresses.apply _)
case class TheSwitch(
switch_id: String,address: List[Addresses] = Nil)
implicit val theSwitchReads: Reads[TheSwitch] = (
(__ \ "switch_id").read[String] and
(__ \ "internal_network").read(list[Addresses](addressesReads)))(TheSwitch)
case class Switches(col: List[TheSwitch])
implicit val switchesReads: Reads[Switches] =
(__ \ "").read(list[TheSwitch](theSwitchReads)) map (Switches.apply _)
当我使用以下方法验证提供的数据时:
val json: JsValue = Json.parse(jsonChunk)
println(json.validate[TheSwitch])
我得到:
JsError(List((/switch_id,List(ValidationError(error.path.missing,WrappedArray()))),(/internal_network,WrappedArray())))))
我可以像这样使用JsPath访问它
val switches: Seq[String] = (json \\ "switch_id").map(_.as[String])
但是我真的不知所措,我在自定义读取方面做错了什么。我已经尝试过放置另一个顶级键和其他组合,但是似乎我缺少了一些关键的东西,因为我是从今天开始的。
非常感谢。
### Error building SqlSession. ### The error may exist in SQL Mapper Configuration ### Cause: org...
这是一个由粗心导致的错误,具体报错如下:
org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may exist in SQL Mapper Configuration ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting aggressiveLazyLoading is not known. Make sure you spelled it correctly (case sensitive). at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:64) at com.test.TestUser.setUp(TestUser.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting aggressiveLazyLoading is not known. Make sure you spelled it correctly (case sensitive). at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:121) at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:99) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:78) ... 25 more Caused by: org.apache.ibatis.builder.BuilderException: The setting aggressiveLazyLoading is not known. Make sure you spelled it correctly (case sensitive). at org.apache.ibatis.builder.xml.XMLConfigBuilder.settingsAsProperties(XMLConfigBuilder.java:134) at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:107) ... 27 more |
看一眼就知道是 xml 文件中属性值有错误,但是全都检查了一遍也没注意到错误的地方,最后在第二次检查的时候才发现是有一处多了一个空格,这也是编程习惯引发的,习惯上我会在两个属性之间加空格,而这次就是因为在敲空格时光标的位置还在属性值的引号范围内,最终导致该属性值找不到匹配项而引发错误,代码如下:
|
而问题就在 <setting name="aggressiveLazyLoading "value="false"/> 的 name 属性中,将里面的空格去了问题就解决了。
6.mybatis 异常:SQL Mapper Configuration,Error parsing Mapper XML,Could not resolve type alias
在 xxxMapper 中
<select id="getClazz" parameterType="int" resultType="getClazzMap">
SELECT * FROM class c,teacher t WHERE c.tid = t.tid AND c.cid=#{id}
</select>
<resultMap type="Clazz" id="getClazzMap">
<id property="id" column="cid"/>
<result property="name" column="cname"/>
<!-- 关联班级对应的teacher -->
<association property="teacher" javaType="Teacher">
<id property="id" column="tid"/>
<result property="name" column="tname"/>
</association>
</resultMap>
查各种资料发现,用到 resultType,必须在 mybatis 的配置文件中进行别名申明该 resultType 属于哪个实体类:
<!-- 配置xxxMapper.xml中的实体类的别名 -->
<typeAliases>
<!-- 单个实体类配置别名 -->
<typeAlias type="com.mlxs.mybatis.test1.User" alias="User"/>
<typeAlias type="com.mlxs.mybatis.test1.Clazz" alias="getClassMap"/>
<!-- 整个包配置,别名默认为类名 推荐 -->
<package name="com.mlxs.mybatis.bean"/>
</typeAliases>
但是,其实我这上面用错了,我真正要用的是 resultMap,不是 resultType
<select id="getClazz" parameterType="int" resultMap="getClazzMap">
SELECT * FROM class c,teacher t WHERE c.tid = t.tid AND c.cid=#{id}
</select>
<resultMap type="Clazz" id="getClazzMap">
<id property="id" column="cid"/>
<result property="name" column="cname"/>
<!-- 关联班级对应的teacher -->
<association property="teacher" javaType="Teacher">
<id property="id" column="tid"/>
<result property="name" column="tname"/>
</association>
</resultMap>
这个在写的时候要非常注意... ...
Background Suppression Network for Weakly-supervised Temporal Action Localization [Paper Reading]
研究内容:弱监督时域动作定位
结果:Thumos14 mAP0.5 = 27.0
ActivityNet1.3 mAP0.5 = 34.5
从结果可以看出弱监督这种瞎猜的方式可以PK掉早些时候的一些全监督方法
Code: GitHub P.S.我在机器上复现始终差一点点
Motivation: 发现之前的工作没有考虑到背景类别,会将背景帧误分为动作类别,造成大量FP。本文提出了背景抑制网络BaSNet,引入了额外的背景类,两支镜像网络(一支为base网络,一支为用attention抑制背景的suppression网络),实验表明这样设计可以有效抑制背景的影响,从而提高定位的准确性。
Idea来源: attention模块参考自STPN[2] (CVPR2018) 将fc换成时域卷积,并且与STPN的attention输入为单个clip特征不同本文的attention的输入为视频特征,STPN的作者今年有一篇ICCV2019的工作[3]也是围绕背景建模,在STPN的基础上引入了(1-λ)作为背景类的权重,细节暂且不表
关于背景建模出现在弱监督时域动作定位领域最早的一篇是"Completeness modeling and context separation for weakly supervised temporal action localization"(CVPR2019)[6]
这篇文章的主要卖点不是背景这里,但背景类的引入启发了后续的3个工作,本文和上面提到的STPN的强化版,还有特别优秀的LPAT[4](Shou Zheng团队的工作)
方法:
过去的工作类似base branch没有背景类。作者想引入背景类,如果单纯的直接引入背景类,数据集的设定使得无法找到完全没有背景的负样本用于训练,即每个视频groundtruth背景类别均为1(全是正样本),最后会导致背景类的异常高响应,定位结果很差。
为了构造背景类的负样本,在另一支网络中引入attention模块(filtering module)抑制背景的响应。整个网络结构使用共享权重的conv模块分别处理两个分支,这两个分支唯一的不同点就是输入(supp分支的输入经过attention处理)和background label(base的背景类为1,supp的背景类为0) 这两点不同。这样做的目标是更好的训练filtering module使其学到前景信息,从而有效过滤并抑制背景的响应。
MIL分类的 top-k mean 想法源自WTALC[5]的方法
最后的location模块在测试阶段选取supp分支的输出,后续操作仍然采用多阈值分割后NMS的方式,proposal的confidence score本文借用CMCS[6]的方法:计算proposal区域和边界区域的均值得分之差
效果图:
参考文献
[1] Background Suppression Network for Weakly-supervised Temporal Action Localization (AAAI2020)
[2] (STPN) Weakly Supervised Action Localization by Sparse Temporal Pooling Network (CVPR 2018)
[3] Weakly-supervised Action Localization with Background Modeling (ICCV 2019)
[4] LPAT: Learning to Predict Adaptive Threshold for Weakly-supervised Temporal Action Localization (arxiv 2019)
[5] W-TALC: Weakly-supervised Temporal Activity Localization and Classification (ECCV 2018)
[6] (CMCS) Completeness Modeling and Context Separation for Weakly Supervised Temporal Action Localization (CVPR 2019)
BOM validation - cannot find where this error message is raised
# Created by Wang, Jerry, last modified on Nov 28, 2016















本文分享 CSDN - 汪子熙。
如有侵权,请联系 support@oschina.cn 删除。
本文参与 “OSC 源创计划”,欢迎正在阅读的你也加入,一起分享。
今天关于播放ScalaJSON Reads [T]解析ValidationError和error.path.missing,WrappedArray的讲解已经结束,谢谢您的阅读,如果想了解更多关于### Error building SqlSession. ### The error may exist in SQL Mapper Configuration ### Cause: org...、6.mybatis 异常:SQL Mapper Configuration,Error parsing Mapper XML,Could not resolve type alias、Background Suppression Network for Weakly-supervised Temporal Action Localization [Paper Reading]、BOM validation - cannot find where this error message is raised的相关知识,请在本站搜索。
本文标签: