logdir = os.path.join(param['log'], cur_time)
if not os.path.exists(logdir):
os.makedirs(logdir)
转载自https://blog.csdn.net/ShuqiaoS/article/details/88559977
3. python中的__getitem__()方法会让一个类变得可以迭代。
转自https://blog.csdn.net/ZT7524/article/details/96479481
-
str.strip() 用于移除字符串头和尾部的指定字符,如果没有参数就是空格和换行符。
str.split("",num) 使用指定符号对字符串切片,如果num不指定,则默认为-1,全切,如果指定为n,则将字符串且分为n+1段 -
nn.CrossEntropy(outputs, labels) 这个函数内部集成了nn.LogSoftmax()和nn.NLLLoss(),做了三件事:
(1).softmax
(2).取Log
(3).计算negative log likelihood loss.
所以这里的outputs就是网络输出的各类的预测概率。 -
UCF101视频大概150帧左右,大小为320x240,kinetic400 有不同的分辨率和帧率