Fast convnets using group-wise brain damage

Fast convnets using group-wise brain damage

出发点

convolution layer中,很多工具箱(caffe等)都把卷积操作转换成矩阵操作,通过增加并行度来提升计算速度。那么在这个基础上怎么继续加速矩阵运算呢?
对于一个输入是64x224x224的特征图来说,如果有64组3x3卷积核,那么正常的矩阵转化计算就变成

(224
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Group-wise cross-validation is a type of cross-validation that is used when the data has a group structure. It is a more appropriate approach when the samples are collected from different subjects, experiments, or measurement devices. In group-wise cross-validation, the data is divided into groups, and the validation process is performed on each group separately. This ensures that the model is evaluated on data from different groups, which helps to assess its generalization performance in real-world scenarios. Here is an example of how group-wise cross-validation can be implemented using the K-fold cross-validation technique: ```python from sklearn.model_selection import GroupKFold from sklearn.linear_model import LogisticRegression # Assuming we have features X, labels y, and groups g X = ... y = ... groups = ... # Create a group-wise cross-validation iterator gkf = GroupKFold(n_splits=5) # Initialize a model model = LogisticRegression() # Perform group-wise cross-validation for train_index, test_index in gkf.split(X, y, groups): X_train, X_test = X[train_index], X[test_index] y_train, y_test = y[train_index], y[test_index] # Fit the model on the training data model.fit(X_train, y_train) # Evaluate the model on the test data score = model.score(X_test, y_test) # Print the evaluation score print("Validation score: ", score) ``` In this example, the data is divided into 5 groups using the GroupKFold function. The model is then trained and evaluated on each group separately. The evaluation score for each fold is printed to assess the model's performance.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值