はじめまして、初投稿です。
機械学習、転移学習の勉強をここ1か月の間でしています。
そして今、物体検出のSSDと呼ばれる技術を勉強中です。
こちらのコードを自分の環境で動かしてみようと思ったのですがエラーが発生しました。
ModuleNotFoundError Traceback (most recent call last) <ipython-input-4-82e9bd807eab> in <module>() 7 from matplotlib import pyplot as plt 8 ----> 9 from models.keras_ssd300 import ssd_300 10 from keras_loss_function.keras_ssd_loss import SSDLoss 11 from keras_layers.keras_layer_AnchorBoxes import AnchorBoxes ModuleNotFoundError: No module named 'models' --------------------------------------------------------------------------- NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt. To view examples of installing some common dependencies, click the "Open Examples" button below. ---------------------------------------------------------------------------
実行したもの from keras import backend as K from keras.models import load_model from keras.preprocessing import image from keras.optimizers import Adam from imageio import imread import numpy as np from matplotlib import pyplot as plt from models.keras_ssd300 import ssd_300 from keras_loss_function.keras_ssd_loss import SSDLoss from keras_layers.keras_layer_AnchorBoxes import AnchorBoxes from keras_layers.keras_layer_DecodeDetections import DecodeDetections from keras_layers.keras_layer_DecodeDetectionsFast import DecodeDetectionsFast from keras_layers.keras_layer_L2Normalization import L2Normalization from ssd_encoder_decoder.ssd_output_decoder import decode_detections, decode_detections_fast from data_generator.object_detection_2d_data_generator import DataGenerator from data_generator.object_detection_2d_photometric_ops import ConvertTo3Channels from data_generator.object_detection_2d_geometric_ops import Resize from data_generator.object_detection_2d_misc_utils import apply_inverse_transforms %matplotlib inline
わからないこと
**ModuleNotFoundError:**だったので、!pipでinstallしてやろうと思ったのですが何をinstallした方がよいのかわかりません。
'models'ってなんだ...kerasのmodelsとは違うものなのかな...
といった具合です。ご教授ください。
ためしたこと
エラーの内容と関係ないと思うのですが一応...
今回とは別の勉強をしていた際に、
keras、tenssorflowのver依存でチュートリアルのコードが実行できない!
ということが多々あったので、こちらに書かれているverにしました。具体的には、該当エラーの前文に下記の記述をしました。
# !pip uninstall tensorflow # !pip uninstall keras !pip install keras==2.0.1 !pip install tensorflow==1.13.1 !pip install imageio !pip show keras !pip show tensorflow
実行した環境
google Colaboratory
Python 3.7.12
keras 2.0.1
tensorflow 1.13.1
ご回答お待ちしております。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/01/27 05:34