caffemodel: age_net.caffemodel
caffemodel_url: https://github.com/GilLevi/AgeGenderDeepLearning/raw/master/models/age_net.caffemodel
| """ | |
| A minimal implementation of Monte Carlo tree search (MCTS) in Python 3 | |
| Luke Harold Miles, July 2019, Public Domain Dedication | |
| See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search | |
| https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1 | |
| """ | |
| from abc import ABC, abstractmethod | |
| from collections import defaultdict | |
| import math |
caffemodel: age_net.caffemodel
caffemodel_url: https://github.com/GilLevi/AgeGenderDeepLearning/raw/master/models/age_net.caffemodel
| # Copyright 2014 Google Inc. All Rights Reserved. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| , | |
| ? | |
| 、 | |
| 。 | |
| “ | |
| ” | |
| 《 | |
| 》 | |
| ! | |
| , |
| import numpy as np | |
| import marisa_trie | |
| from sklearn.feature_extraction.text import CountVectorizer | |
| from sklearn.externals import six | |
| class MarisaCountVectorizer(CountVectorizer): | |
| # ``CountVectorizer.fit`` method calls ``fit_transform`` so | |
| # ``fit`` is not provided | |
| def fit_transform(self, raw_documents, y=None): |