Yuhe Liu

Results 6 issues of Yuhe Liu

## Describe the bug 在jittor_cuda的docker容器中运行“60分钟快速入门Jittor"的最后一个ipynb"计图入门教程3 --- 尝试解决一个实际问题”时,运行第23个cell(定义训练和测试函数并运行)时出现报错 ## Full Log RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.data)). Types of your inputs are: self = Var, The function declarations are:...

In graph_generator_example, the final result should be `node_vec` and `graph-edge`,which is something like ``` [[2, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,...

在第五次作业的“信息列表维护”一题中,同学们遇到了比之前要求更高的字符串输入格式的要求。主要难点为:**将某个字符串用某个字符作为分隔符进行分割,得到一个字符串列表。** 在python中,我们有很简单的方法做到这件事情: ```python s = "string1/string2/string3" sl = s.split('/') print(sl) # ["string1", "string2", "string3"] ``` 但在cpp的string库中并没有提供这种便捷的方法,一个显而易见的原因是cpp缺乏一个通用的存储容器,如果硬要指定分割后的字符串存在stl的vector/list等容器中,则会带来库与库之间的耦合。因此,我们不得不自己利用一些已有的工具来实现这个分割的功能。 ###### 简单粗暴版:遍历字符串数组 ```cpp while(s[i] != '\0') { if(s[i] == '/') { ++cnt; idx =...

有同学在做第三次作业第二题时注意到了这么一个现象,假设有函数foo如下: ```cpp Test foo(Test &a) { return a; } ``` 其中Test类显式定义了移动构造函数,当我们执行 ```cpp Test a; Test b = foo(a); ``` 时,foo函数返回的时候会调用移动构造函数还是拷贝构造函数呢? L6-引用与复制一节的课件第41页讲到: > 函数返回类对象(类中显式定义移动构造函数,不进⾏返回值优化): {return Test(); or return tmp;}均调用移动构造 然而程序运行结果表明,上述代码中函数返回时调用的是拷贝构造函数,而非同学所希望的移动构造函数。是因为a是左值吗?并没有那么简单,请观察如下代码: ```cpp...

关于作业的第二题: 1. 观察main.cpp中的代码: ```c++ #if defined(__F1__) #include "f1.h" #endif #if defined(__F2__) #include "f2.h" #endif //... #if defined(__F1__) cout

The Confirmed Vulnerable contracts are not labeled in this repo, may I have their labels in a file like csv or something?