当前位置:网站首页>Kaggle调用自定义模块方法
Kaggle调用自定义模块方法
2022-07-27 05:20:00 【Segment*Fault】
【问题描述】
白嫖Kaggle有一段时间了,想调用自定义模块,不知道怎么用。
【解决办法】
- 先把相关代码压缩成zip文件。
- 上传zip文件到input

- 上传成功后,在input栏就有自己的包了,如果input没有自己的包,则点Your DataSet选择刚刚上传的数据集。

- 添加input目录
# 首先添加input目录
import sys
sys.path.append('../input')
print(sys.path)
- 导入模块
from 文件夹名.模块名 import 模块
【具体实践】
以导入ge文件夹的classify.py文件为例,
# 首先添加input目录
import sys
sys.path.append('../input')
print(sys.path)
# 然后按包名.文件夹.文件直接导入即可
from gembed.ge.classify import read_node_label, Classifier
边栏推荐
猜你喜欢

剪枝-量化-转onnx中文系列教程

李宏毅 2020 深度学习与人类语言处理 DLHLP-Conditional Generation by RNN and Attention-p22
![[high concurrency] interviewer](/img/50/baa662cb4ce30cf2ef4cb5952960dd.jpg)
[high concurrency] interviewer

WebODM win10安装教程(亲测)

Day 3. Suicidal ideation and behavior in institutions of higher learning: A latent class analysis

数字图像处理——第九章 形态学图像处理

【11】二进制编码:“手持两把锟斤拷,口中疾呼烫烫烫”?

数字图像处理 第二章 数字图像基础

Super remote connection management tool: Royal TSX

数字图像处理第四章——频率域滤波
随机推荐
System Design的相关准备材料
关于druid连接不上数据库的问题
剪枝-量化-转onnx中文系列教程
Gbase 8C - SQL reference 6 SQL syntax (4)
数字图像处理第五章——图像复原与重建
Auto Encoder(AE),Denoising Auto Encoder(DAE), Variational Auto Encoder(VAE) 区别
根据SQL必知必会学习SQL(MYSQL)
9. High order operation
【头歌】重生之我在py入门实训中(2):公式编程
Global evidence of expressed sentimental alterations during the covid-19 pandemics
socket编程二:使用select
Gbase 8C - SQL reference 4 character set support
【11】二进制编码:“手持两把锟斤拷,口中疾呼烫烫烫”?
物联网操作系统多任务基础
What tools are needed to make video post effects?
5. Indexing and slicing
视觉横向课题bug1:FileNotFoundError: Could not find module ‘MvCameraControl.dll‘ (or one of it
11. Gradient derivation of perceptron
【头歌】重生之CNN图片分类基础
Greedy high performance neural network and AI chip application research and training