train.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:Multi-views-fusion 作者: luogongning 项目源码 文件源码
def split_data(X, y, split_ratio=0.6):
    """
    Split data into training and testing.

    :param X: X
    :param y: y
    :param split_ratio: split ratio for train and test data
    """
    #split = int(X.shape[0] * split_ratio)
    #the input dimensions can be control through modifing the second axis.
    X_train= X[:, 1:4, :, :]
    y_train=y
    """
    Load validation data from .npy files.
    """
    X_test_R = np.load('data/X_validation_ALL.npy')
    X_test_R = X_test_R.astype(np.float32)
    X_test_R /= 255
    X_test_R=preprocess(X_test_R)
    X_test = X_test_R[:, 1:4, :, :]
    #y_test = int(y_test_R*0.2)

    y_test_R = np.load('data/y_validation.npy')
    y_test=y_test_R

    return X_train, y_train, X_test, y_test
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号