Closed CrawlingForward closed 2 months ago
你好! 相关config如下: "task_info":{ "label_type": "multi_label", "hierarchical": false, "hierar_taxonomy": "data/rcv1.taxonomy", "hierar_penalty": 0.000001 }, "device": "cuda", "model_name": "TextCNN", "checkpoint_dir": "checkpoint_dir_spc", "model_dir": "trained_model_ipc",
"embedding": { "type": "region_embedding", "dimension": 300, "region_embedding_type": "context_word", "region_size": 5, "initializer": "uniform", "fan_mode": "FAN_IN", "uniform_bound": 0.25, "random_stddev": 0.01, "dropout": 0.0 }, 使用自建数据,选择textCNN模型,非层次多标签任务,其他参数未动,"type": "embedding", 可正常运行。
问题出在哪,应该如何修改,谢谢?
在 model\embedding.py的201行之上,加上两行,试一试: mask = mask.to(context_embedding.device) neg_mask = neg_mask.to(context_embedding.device)
你好! 相关config如下: "task_info":{ "label_type": "multi_label", "hierarchical": false, "hierar_taxonomy": "data/rcv1.taxonomy", "hierar_penalty": 0.000001 }, "device": "cuda", "model_name": "TextCNN", "checkpoint_dir": "checkpoint_dir_spc", "model_dir": "trained_model_ipc",
"embedding": { "type": "region_embedding", "dimension": 300, "region_embedding_type": "context_word", "region_size": 5, "initializer": "uniform", "fan_mode": "FAN_IN", "uniform_bound": 0.25, "random_stddev": 0.01, "dropout": 0.0 }, 使用自建数据,选择textCNN模型,非层次多标签任务,其他参数未动,"type": "embedding", 可正常运行。
问题出在哪,应该如何修改,谢谢?